/* Flyff Dungeon Bot - Modern Admin Dashboard */

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

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

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

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

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

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-card: #16161f;
    --bg-card-hover: #1e1e2a;
    --bg-input: #0f0f15;

    --accent-primary: #6366f1;
    --accent-primary-dim: rgba(99, 102, 241, 0.15);
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;

    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.1);

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Starfield Background */
.starfield {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: radial-gradient(ellipse at bottom, #1a1a2e 0%, #0a0a0f 100%);
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
}

.stars-layer {
    position: absolute;
    width: 200%;
    height: 200%;
    background-image:
        radial-gradient(1px 1px at 20px 30px, rgba(255,255,255,0.9), transparent),
        radial-gradient(1.5px 1.5px at 40px 70px, rgba(255,255,255,0.6), transparent),
        radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1.5px 1.5px at 160px 120px, rgba(255,255,255,1), transparent),
        radial-gradient(1px 1px at 180px 50px, rgba(255,255,255,0.6), transparent);
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: starsMove 120s linear infinite, twinkle 4s ease-in-out infinite;
}

.stars-layer:nth-child(2) {
    background-image:
        radial-gradient(1px 1px at 25px 45px, rgba(255,255,255,0.7), transparent),
        radial-gradient(2px 2px at 75px 100px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 125px 25px, rgba(255,255,255,0.8), transparent),
        radial-gradient(1px 1px at 175px 140px, rgba(255,255,255,0.6), transparent);
    background-size: 250px 250px;
    animation: starsMove 180s linear infinite reverse, twinkle 5s ease-in-out infinite;
    animation-delay: -2s;
    opacity: 0.7;
}

.stars-layer:nth-child(3) {
    background-image:
        radial-gradient(2px 2px at 60px 80px, rgba(100,200,255,0.6), transparent),
        radial-gradient(1px 1px at 140px 30px, rgba(255,255,255,0.5), transparent),
        radial-gradient(1.5px 1.5px at 30px 150px, rgba(150,180,255,0.7), transparent);
    background-size: 300px 300px;
    animation: starsMove 240s linear infinite, twinkle 6s ease-in-out infinite;
    animation-delay: -4s;
    opacity: 0.5;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

@keyframes starsMove {
    from { transform: translate(0, 0); }
    to { transform: translate(-50%, -50%); }
}

/* Typography */
h1, h2, h3, h4, h5 {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-secondary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes glowPulse {
    0%, 100% {
        filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.6)) drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.9)) drop-shadow(0 0 35px rgba(0, 212, 255, 0.5));
    }
}

@keyframes subtleGlow {
    0%, 100% {
        opacity: 0.4;
    }
    50% {
        opacity: 0.7;
    }
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 4rem;
}

.login-container {
    text-align: left;
    max-width: 360px;
    animation: fadeIn 0.6s ease;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

@media (max-width: 900px) {
    .login-page {
        flex-direction: column;
        gap: 2rem;
    }
    .login-container {
        text-align: center;
    }
}

.login-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 2rem;
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.3);
    animation: float 6s ease-in-out infinite;
}

/* Bot Character with Glow Animation */
.bot-character {
    position: relative;
    width: 320px;
    flex-shrink: 0;
}

.bot-character img {
    width: 100%;
    height: auto;
    display: block;
}

/* Cyan glow overlay - only the blue elements */
.bot-character::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/bot-char-glow.png') no-repeat center;
    background-size: contain;
    filter: blur(6px) brightness(2);
    animation: cyanPulse 2s ease-in-out infinite;
    pointer-events: none;
}

/* Second glow layer for more intensity */
.bot-character::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/bot-char-glow.png') no-repeat center;
    background-size: contain;
    filter: blur(15px) brightness(2.5);
    animation: cyanPulse 2s ease-in-out infinite;
    animation-delay: 0.1s;
    pointer-events: none;
}

@keyframes cyanPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Sad bot character (for error pages) */
.bot-character-sad {
    position: relative;
    width: 320px;
    flex-shrink: 0;
}

.bot-character-sad img {
    width: 100%;
    height: auto;
    display: block;
}

.bot-character-sad::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/bot-sad-glow.png') no-repeat center;
    background-size: contain;
    filter: blur(6px) brightness(2);
    animation: cyanPulse 2s ease-in-out infinite;
    pointer-events: none;
}

.bot-character-sad::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/bot-sad-glow.png') no-repeat center;
    background-size: contain;
    filter: blur(15px) brightness(2.5);
    animation: cyanPulse 2s ease-in-out infinite;
    animation-delay: 0.1s;
    pointer-events: none;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 28px;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: #5865F2;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s;
}

.login-btn:hover {
    background: #6974f5;
    color: #fff;
}

.login-btn svg {
    width: 22px;
    height: 22px;
}

/* App Layout */
.app-container {
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.app-wrapper {
    display: flex;
    width: 100%;
    max-width: 1400px;
    gap: 2rem;
}

/* Sidebar */
.sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    height: fit-content;
    position: sticky;
    top: 2rem;
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.sidebar-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 450;
    transition: all 0.15s;
    border-left: 2px solid transparent;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
    color: var(--accent-primary);
    background: var(--accent-primary-dim);
    border-left-color: var(--accent-primary);
}

.nav-item svg {
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
}

.logout-btn {
    padding: 6px 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.logout-btn:hover {
    color: var(--accent-danger);
    border-color: var(--accent-danger);
}

/* Main Content */
.main-content {
    flex: 1;
    min-width: 0;
    animation: fadeIn 0.4s ease;
}

/* Top Header Bar */
.top-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    transition: all 0.2s;
}

.user-pill:hover {
    border-color: var(--border-hover);
}

.user-pill .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.user-pill .user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.user-pill .logout-pill {
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}

.user-pill .logout-pill:hover {
    color: #fff;
    background: var(--accent-danger);
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 20px;
    height: 20px;
}

.stat-icon.servers { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.stat-icon.events { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.stat-icon.banned { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.stat-icon.participants { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.stat-icon.database { background: rgba(6, 182, 212, 0.15); color: #06b6d4; }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

/* Card Styles */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.2s;
    animation: fadeIn 0.4s ease;
}

.card:hover {
    border-color: var(--border-hover);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon img {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.card-icon-letter {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 1.1rem;
}

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

.card-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'SF Mono', Monaco, monospace;
}

.card-stats {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.card-stat {
    flex: 1;
    text-align: center;
}

.card-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-primary);
}

.card-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Event Card Specific */
.event-type {
    color: var(--accent-secondary);
    font-weight: 600;
}

.event-meta {
    margin-bottom: 1rem;
}

.event-datetime {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.event-created {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.role-slots {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.role-slot {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--bg-input);
    border-radius: 20px;
    font-size: 0.8rem;
    border-left: 2px solid transparent;
}

.role-slot.tank { border-left-color: #6366f1; }
.role-slot.rm { border-left-color: #10b981; }
.role-slot.aoe { border-left-color: #ef4444; }
.role-slot.dd { border-left-color: #f59e0b; }

/* Templates list */
.templates-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.template-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color 0.2s;
}

.template-item:hover {
    border-color: var(--accent-primary);
}

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

.template-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.badge-main {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent-primary);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-warning);
}

.card-main {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary-dim);
}

.card-banned {
    border-color: var(--accent-danger);
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--accent-primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--accent-secondary);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.btn-danger {
    background: transparent;
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--accent-danger);
    color: #fff;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

/* Search Bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
}

.search-bar svg {
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-bar input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.search-bar input:focus {
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s, visibility 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    max-width: 440px;
    width: 90%;
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.modal-title {
    font-size: 1.1rem;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 4px;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

/* Input */
.input-group {
    margin-bottom: 1rem;
}

.input-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.15;
    transition: all 0.15s;
    color-scheme: dark;
    box-sizing: border-box;
}

.input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-dim);
}

/* Hide number input spinners */
input[type="number"].input::-webkit-inner-spin-button,
input[type="number"].input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"].input {
    -moz-appearance: textfield;
}

select.input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select.input option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

textarea.input {
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

/* Custom Select */
.custom-select {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 0.9rem;
    line-height: 1.15;
    box-sizing: border-box;
}

.custom-select-trigger:hover {
    border-color: var(--border-hover);
}

.custom-select.open .custom-select-trigger {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-dim);
}

.custom-select-trigger::after {
    content: '';
    margin-left: auto;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    transition: transform 0.2s;
}

.custom-select.open .custom-select-trigger::after {
    transform: rotate(180deg);
}

.custom-select-placeholder {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.custom-select-value {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.custom-select-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.custom-select-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-select-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.custom-select-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-select-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.custom-select-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
}

.custom-select.open .custom-select-options {
    display: block;
}

.custom-select-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
}

.custom-select-option:hover {
    background: var(--bg-tertiary);
}

.custom-select-option.selected {
    background: var(--accent-primary-dim);
}

.custom-select-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.custom-select-search {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
}

.custom-select-search-input {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}

.custom-select-search-input:focus {
    border-color: var(--accent-primary);
}

.custom-select-search-input::placeholder {
    color: var(--text-muted);
}

/* User Search */
.search-container {
    position: relative;
}

.search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
}

.search-result:hover {
    background: var(--bg-tertiary);
}

.search-result.is-admin {
    opacity: 0.5;
    cursor: not-allowed;
}

.search-result.is-admin:hover {
    background: transparent;
}

.search-result-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.search-result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    flex: 1;
    min-width: 0;
}

.search-result-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

.search-result-display {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: 0.25rem;
}

.search-result-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

.search-result-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Selected User Display */
.selected-user {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--accent-primary-dim);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    margin-top: 0.75rem;
}

.selected-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.selected-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

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

.selected-user-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.selected-user-name {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 500;
}

.selected-user-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: monospace;
}

/* Role Search */
.role-search-container {
    position: relative;
}

.role-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 250px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.1s;
}

.search-result-item:hover {
    background: var(--bg-tertiary);
}

.search-result-item.no-results {
    color: var(--text-muted);
    cursor: default;
    justify-content: center;
}

.search-result-item.no-results:hover {
    background: transparent;
}

.role-badge {
    font-size: 0.9rem;
    font-weight: 500;
}

.selected-role {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--accent-primary-dim);
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-sm);
    margin-top: 0.75rem;
}

.selected-role .role-badge {
    font-size: 1rem;
}

.btn-small {
    padding: 0.25rem 0.5rem;
    min-width: auto;
}

/* Error Page */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.error-title {
    font-size: 1.25rem;
    color: var(--accent-danger);
    margin-bottom: 0.5rem;
}

.error-message {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    max-width: 360px;
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Toast */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    animation: slideIn 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.toast.success { border-left: 3px solid var(--accent-success); }
.toast.error { border-left: 3px solid var(--accent-danger); }
.toast.info { border-left: 3px solid var(--accent-primary); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Responsive */
@media (max-width: 1024px) {
    .app-container { padding: 1.5rem; }
    .app-wrapper { gap: 1.5rem; }
    .sidebar { width: 200px; }
}

@media (max-width: 768px) {
    .app-container { padding: 1rem; }
    .app-wrapper {
        flex-direction: column;
        gap: 1rem;
    }
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
    }
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 0.5rem;
    }
    .nav-item {
        padding: 8px 12px;
        border-left: none;
        border-radius: var(--radius-sm);
    }
    .nav-item.active {
        border-left: none;
    }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    html { font-size: 14px; }
    .user-pill .user-name { display: none; }
}

/* ========================================
   Public Pages Navigation & Content
   ======================================== */

/* Public Navigation */
.public-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.public-nav::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(10, 10, 15, 0.9) 0%, rgba(10, 10, 15, 0) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.public-nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.public-nav.scrolled::after {
    opacity: 1;
}

.public-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

.public-nav-logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.public-nav-logo:hover {
    color: var(--text-primary);
}

.public-nav-links {
    display: flex;
    gap: 0.25rem;
    position: relative;
}

/* Sliding indicator */
.nav-indicator {
    position: absolute;
    height: 100%;
    background: var(--accent-primary-dim);
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.public-nav-link {
    padding: 0.5rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 450;
    border-radius: var(--radius-sm);
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}

.public-nav-link:hover {
    color: var(--text-primary);
}

.public-nav-link.active {
    color: var(--accent-primary);
}

.public-nav-toggle {
    display: none;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.public-nav-toggle svg {
    width: 24px;
    height: 24px;
}

.public-nav-mobile {
    display: none;
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin: 0 1rem;
}

.public-nav-mobile.active {
    display: flex;
}

.public-nav-mobile .public-nav-link {
    padding: 0.75rem 1rem;
}

@media (max-width: 768px) {
    .public-nav-links {
        display: none;
    }

    .public-nav-toggle {
        display: block;
    }

    .public-nav-container {
        padding: 0.75rem 1rem;
    }
}

/* Public Page Layout */
.public-page {
    min-height: calc(100vh - 80px);
    padding-top: 80px;
    display: flex;
    flex-direction: column;
}

/* Page Load Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }
.animate-in-delay-5 { animation-delay: 0.5s; }
.animate-in-delay-6 { animation-delay: 0.6s; }
.animate-in-delay-7 { animation-delay: 0.7s; }
.animate-in-delay-8 { animation-delay: 0.8s; }

.public-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.public-content-narrow {
    max-width: 700px;
}

.public-header {
    text-align: center;
    margin-bottom: 3rem;
}

.public-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, #a0a0b0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.public-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Content Sections */
.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.content-section h3 {
    font-size: 1rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-secondary);
}

.content-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--accent-primary-dim);
    color: var(--accent-primary);
    border-radius: 50%;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Code Block */
.code-block {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.9rem;
    color: var(--accent-primary);
    overflow-x: auto;
    margin: 1rem 0;
}

.content-section code {
    background: var(--bg-input);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85em;
    color: var(--accent-primary);
}

/* Info Box */
.info-box {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: var(--accent-primary-dim);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.info-box svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.info-box p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Warning variant */
.info-box.warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
}

.info-box.warning svg {
    color: var(--accent-warning);
}

.info-box.highlight {
    flex-direction: column;
    gap: 0.75rem;
}

.info-box.highlight svg {
    width: 24px;
    height: 24px;
}

.info-box.highlight strong {
    color: var(--text-primary);
}

/* Permissions Grid */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.permission-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.permission-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary-dim);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.permission-icon svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.permission-info strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.permission-info span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Steps List */
.steps-list {
    list-style: none;
    padding: 0;
}

.steps-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
}

.steps-list li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-primary);
    font-weight: 600;
}

.steps-list li a {
    color: var(--accent-primary);
}

/* Steps Numbered */
.steps-numbered {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    gap: 1.25rem;
}

.step-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    color: #fff;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Button Large */
.btn-lg {
    padding: 14px 24px;
    font-size: 1rem;
}

/* Command Grid */
.command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.command-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 0.2s;
}

.command-card:hover {
    border-color: var(--border-hover);
}

.command-header {
    margin-bottom: 0.75rem;
}

.command-header code {
    font-size: 0.95rem;
    font-weight: 500;
}

.command-card > p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.command-params {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.command-params .param {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.command-params .param strong {
    color: var(--text-secondary);
}

/* Roles Grid */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.role-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    border-left: 3px solid transparent;
}

.role-card.role-tank { border-left-color: #6366f1; }
.role-card.role-rm { border-left-color: #10b981; }
.role-card.role-aoe { border-left-color: #ef4444; }
.role-card.role-dd { border-left-color: #f59e0b; }

.role-icon {
    font-size: 1.5rem;
}

.role-info h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.role-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
}

.feature-list li svg {
    width: 18px;
    height: 18px;
    color: var(--accent-success);
    flex-shrink: 0;
    margin-top: 2px;
}

/* FAQ Styles */
.faq-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    position: relative;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    max-width: 700px;
}

.faq-image-container {
    flex-shrink: 0;
    width: 280px;
    align-self: flex-start;
    position: sticky;
    top: 100px;
}

.faq-bot-wrapper {
    position: relative;
    width: 100%;
}

.faq-bot-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Cyan glow overlay - pulsing */
.faq-bot-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/discord-dungeon-bot-faq-glow.png') no-repeat center;
    background-size: contain;
    filter: blur(6px) brightness(2);
    animation: faqCyanPulse 2s ease-in-out infinite;
    pointer-events: none;
}

/* Second glow layer for intensity */
.faq-bot-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/discord-dungeon-bot-faq-glow.png') no-repeat center;
    background-size: contain;
    filter: blur(15px) brightness(2.5);
    animation: faqCyanPulse 2s ease-in-out infinite;
    animation-delay: 0.1s;
    pointer-events: none;
}

@keyframes faqCyanPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@media (max-width: 900px) {
    .faq-layout {
        flex-direction: column;
    }

    .faq-image-container {
        display: none;
    }

    .faq-list {
        max-width: 100%;
    }
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-question {
    font-weight: 500;
    color: var(--text-primary);
}

.faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}

.faq-item[open] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    transition: height 0.3s ease;
}

.faq-answer p {
    margin: 0 0 0.75rem 0;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.faq-answer li {
    margin: 0.25rem 0;
}

.faq-cta {
    text-align: center;
    margin-top: 2rem;
    padding: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.faq-cta p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Contact Page - Hero Style */
.contact-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding-top: 80px;
}

.contact-hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 2rem;
}

.contact-hero-content {
    text-align: center;
    max-width: 500px;
}

.contact-icon-large {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #5865F2 0%, #7289DA 100%);
    border-radius: 50%;
    box-shadow: 0 10px 40px rgba(88, 101, 242, 0.4);
    animation: pulse-glow 3s ease-in-out infinite;
}

.contact-icon-large svg {
    width: 40px;
    height: 40px;
    color: white;
}

.contact-hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.contact-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.contact-dm-card {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem 1rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 60px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.contact-dm-card:hover {
    border-color: #5865F2;
    box-shadow: 0 0 30px rgba(88, 101, 242, 0.3);
    transform: translateY(-2px);
}

.contact-dm-card:hover .contact-dm-action {
    background: #5865F2;
    color: white;
}

.contact-dm-action {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    margin-left: 0.5rem;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.contact-dm-action svg {
    width: 20px;
    height: 20px;
}

.contact-dm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.contact-dm-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-dm-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-dm-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.contact-dm-hint {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 3rem;
}

.contact-topics {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.contact-topic {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.contact-topic:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-hover);
}

.contact-topic svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 10px 40px rgba(88, 101, 242, 0.4);
    }
    50% {
        box-shadow: 0 10px 60px rgba(88, 101, 242, 0.6), 0 0 20px rgba(88, 101, 242, 0.3);
    }
}

@media (max-width: 768px) {
    .contact-hero-content h1 {
        font-size: 2rem;
    }

    .contact-topics {
        gap: 0.75rem;
    }

    .contact-topic {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   Server Selection Page
   ======================================== */

.server-select-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.server-select-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.server-select-layout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    margin-top: -5rem;
}

.server-select-character {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Laptop character with glow */
.bot-character-laptop {
    position: relative;
    width: 380px;
    flex-shrink: 0;
}

.bot-character-laptop img {
    width: 100%;
    height: auto;
    display: block;
}

.bot-character-laptop::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/bot-laptop-glow.png') no-repeat center;
    background-size: contain;
    filter: blur(6px) brightness(2);
    animation: cyanPulse 2s ease-in-out infinite;
    pointer-events: none;
}

.bot-character-laptop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/bot-laptop-glow.png') no-repeat center;
    background-size: contain;
    filter: blur(15px) brightness(2.5);
    animation: cyanPulse 2s ease-in-out infinite;
    animation-delay: 0.1s;
    pointer-events: none;
}

.server-select-content {
    max-width: 800px;
    width: 100%;
    flex: 1;
}

.server-select-title {
    text-align: left;
    margin-bottom: 2rem;
}

.server-select-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.server-select-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.server-select-title p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Admin Banner */
.admin-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--accent-primary-dim);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.admin-banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.admin-banner-content svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

/* Server Grid */
.server-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

/* Server Card */
.server-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.server-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.server-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.server-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.server-card-icon-letter {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-secondary);
}

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

.server-card-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.server-card-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.server-stat {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.server-stat svg {
    width: 14px;
    height: 14px;
}

.server-card-arrow {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.server-card:hover .server-card-arrow {
    transform: translateX(4px);
    color: var(--accent-primary);
}

.server-card-arrow svg {
    width: 20px;
    height: 20px;
}

/* Empty State Large */
.empty-state-large {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

.empty-state-large svg {
    width: 64px;
    height: 64px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 1.5rem;
}

.empty-state-large h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.empty-state-large p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Sidebar Server Icon */
.sidebar-server-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-server-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-server-icon-letter {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Navigation Divider */
.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 1.5rem;
}

.nav-back {
    color: var(--text-muted) !important;
}

.nav-back:hover {
    color: var(--text-primary) !important;
}

/* Template Management */
.template-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

.template-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.role-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

/* Settings Page */
.settings-layout {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.settings-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    flex: 0 0 600px;
}

.settings-sidebar {
    flex: 1;
    min-width: 0;
    align-self: stretch;
}

.settings-card-sticky {
    position: sticky;
    top: 24px;
}

@media (max-width: 1100px) {
    .settings-layout {
        flex-direction: column;
    }

    .settings-container {
        flex: 1 1 auto;
        max-width: 600px;
    }

    .settings-sidebar {
        max-width: 600px;
    }
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.settings-card-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.settings-card-header h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.settings-card-header p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.settings-card-body {
    padding: 1.25rem;
}

.input-hint {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: 'SF Mono', Monaco, monospace;
}

/* Participants Preview */
.participants-preview {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.participants-preview strong {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.participants-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.participant-tag {
    padding: 2px 8px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.participant-more {
    padding: 2px 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

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

/* Responsive adjustments for server pages */
@media (max-width: 1100px) {
    .server-select-layout {
        gap: 1.5rem;
    }

    .bot-character-laptop {
        width: 280px;
    }
}

@media (max-width: 900px) {
    .server-select-layout {
        flex-direction: column;
        align-items: center;
    }

    .server-select-character {
        padding-top: 0;
    }

    .bot-character-laptop {
        width: 240px;
    }

    .server-select-content {
        max-width: 600px;
    }

    .server-select-title {
        text-align: center;
    }

    .server-select-title-row {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .server-select-page {
        padding: 1rem;
    }

    .server-select-character {
        display: none;
    }

    .server-grid {
        grid-template-columns: 1fr;
    }

    .admin-banner {
        flex-direction: column;
        text-align: center;
    }

    .role-inputs {
        grid-template-columns: 1fr;
    }

    .template-item {
        flex-direction: column;
        align-items: stretch;
    }

    .template-actions {
        flex-direction: row;
        justify-content: flex-end;
    }
}

/* Legal Pages */
.legal-page .content-section {
    margin-bottom: 2rem;
}

.legal-page h2 {
    font-size: 1.1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-page h3 {
    font-size: 0.95rem;
}

.legal-info {
    padding: 1rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin: 1rem 0;
}

.legal-info p {
    margin: 0.25rem 0;
}

.data-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.data-list li {
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
}

.data-list li strong {
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.data-list li span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Public Footer */
.public-footer {
    padding: 2rem;
    text-align: center;
    margin-top: auto;
}

.public-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.public-footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: color 0.15s;
}

.public-footer-links a:hover {
    color: var(--text-primary);
}

.footer-divider {
    color: var(--text-muted);
    opacity: 0.5;
}

/* Login page wrapper for flex layout */
.login-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
}

.login-page-wrapper .login-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 4rem;
}

.login-page-wrapper .public-footer {
    padding: 2rem;
    text-align: center;
}

.login-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Mobile Adjustments for Public Pages */
@media (max-width: 768px) {
    .public-page {
        padding-top: 70px;
    }

    .public-content {
        padding: 1.5rem 1rem;
    }

    .public-header h1 {
        font-size: 1.5rem;
    }

    .public-header p {
        font-size: 1rem;
    }

    .permissions-grid,
    .command-grid,
    .roles-grid {
        grid-template-columns: 1fr;
    }

    .contact-card {
        flex-direction: column;
        text-align: center;
    }

    .contact-methods {
        justify-content: center;
    }

    .step {
        flex-direction: column;
        align-items: flex-start;
    }

    .public-footer {
        padding: 1.5rem 1rem;
    }
}

/* ========================================
   Event Management - Edit & Participants
   ======================================== */

/* Larger modal for participants */
.modal-large {
    max-width: 560px;
}

/* Event description display */
.event-description {
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-style: italic;
}

/* Clickable participants area */
.participants-clickable {
    cursor: pointer;
    transition: background 0.15s;
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin: 0 -0.75rem;
    position: relative;
}

.participants-clickable:hover {
    background: var(--bg-tertiary);
}

.participants-edit-hint {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.7rem;
    color: var(--accent-primary);
    background: var(--accent-primary-dim);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.participants-clickable:hover .participants-edit-hint {
    opacity: 1;
    transform: translateY(0);
}

/* Participants management list */
.participants-manage-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 280px;
    overflow-y: auto;
}

.participant-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    gap: 0.75rem;
}

.participant-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 0;
}

.participant-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.participant-role-badge.role-tank {
    background: rgba(99, 102, 241, 0.15);
    color: #6366f1;
}

.participant-role-badge.role-rm {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.participant-role-badge.role-aoe {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.participant-role-badge.role-dd {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.participant-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Kleine Avatare in Event-Karten Vorschau */
.participant-avatar-small {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 4px;
}

/* Avatare im Teilnehmer-Modal */
.participant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
}

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

/* User search autocomplete */
.user-search-container {
    position: relative;
}

.user-search-results {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 240px;
    overflow-y: auto;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    display: none;
}

.user-search-results.active {
    display: block;
}

/* Add participant section */
.add-participant-section select.input {
    background: var(--bg-input);
}

/* Checkbox label styling */
.checkbox-label {
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ========================================
   Dashboard Configuration Status (Compact)
   ======================================== */

.config-status-compact {
    margin-bottom: 2rem;
}

.config-status-compact h2 {
    margin-bottom: 1rem;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.config-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
}

.config-card:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.config-card.configured {
    border-color: rgba(16, 185, 129, 0.3);
}

.config-card.configured:hover {
    border-color: var(--accent-success);
}

.config-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

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

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

.config-icon.success {
    color: var(--accent-success);
}

.config-icon.warning {
    color: var(--accent-warning);
}

.config-text {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Responsive adjustments for dashboard sections */
@media (max-width: 768px) {
    .config-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   Admin Config & Channel Mapping
   ========================================== */

.config-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-select {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.15s;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 20px;
    padding-right: 36px;
}

.form-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-dim);
}

.form-select-small {
    padding: 6px 10px;
    font-size: 0.8rem;
    width: auto;
    min-width: 140px;
}

/* Channel Mapping List */
.channel-mapping-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.channel-mapping-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    gap: 12px;
}

.channel-mapping-row .channel-name {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Custom Dropdown for Channel Mapping */
.channel-mapping-row .custom-select {
    position: relative;
    width: 130px;
    flex-shrink: 0;
    user-select: none;
}

.channel-mapping-row .custom-select.open {
    z-index: 51;
}

.channel-mapping-row .custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    font-family: inherit;
    background: var(--bg-input);
    background-image: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.channel-mapping-row .custom-select-trigger::after {
    display: none;
}

.channel-mapping-row .custom-select-trigger:hover {
    border-color: var(--border-hover);
}

.channel-mapping-row .custom-select.open .custom-select-trigger {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-primary-dim);
}

.channel-mapping-row .custom-select-trigger .arrow {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.4;
    transition: transform 0.15s;
}

.channel-mapping-row .custom-select.open .custom-select-trigger .arrow {
    transform: rotate(180deg);
}

.channel-mapping-row .custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 100%;
    background: var(--bg-secondary);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    padding: 4px;
    overflow: hidden;
}

.channel-mapping-row .custom-select.open .custom-select-options {
    display: block;
}

.channel-mapping-row .custom-select-option {
    padding: 7px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s, color 0.1s;
    white-space: nowrap;
}

.channel-mapping-row .custom-select-option:hover {
    background: var(--accent-primary-dim);
    color: var(--text-primary);
}

.channel-mapping-row .custom-select-option.selected {
    color: var(--accent-primary);
}

.channel-mapping-row .custom-select-option.option-inactive {
    color: var(--text-muted);
    font-style: italic;
}

.channel-mapping-row .custom-select-option.option-inactive:hover {
    color: var(--text-primary);
}

/* Inactive channel row */
.channel-mapping-row.is-inactive {
    background: rgba(15, 15, 21, 0.5);
    border-color: transparent;
}

.channel-mapping-row.is-inactive .channel-name {
    opacity: 0.35;
    color: var(--text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(100, 116, 139, 0.5);
}

.channel-mapping-row.is-inactive .custom-select-trigger {
    opacity: 0.35;
    background-color: rgba(100, 116, 139, 0.1);
    border-color: rgba(100, 116, 139, 0.2);
    color: var(--text-muted);
}

.channel-mapping-row.is-inactive:hover .channel-name,
.channel-mapping-row.is-inactive:hover .custom-select-trigger {
    opacity: 0.6;
}

.channel-mapping-row.is-inactive .custom-select.open .custom-select-trigger {
    opacity: 1;
}

/* Content section for admin config */
.content-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
}

.section-header {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.section-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* Server Roles Tabs */
.server-roles-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 4px;
    border: 1px solid var(--border-color);
    position: relative;
}

.server-roles-tabs .tab-slider {
    position: absolute;
    top: 4px;
    left: 4px;
    height: calc(100% - 8px);
    background: var(--accent-primary);
    border-radius: var(--radius-sm);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.tab-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: color 0.2s;
    position: relative;
    z-index: 1;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: #fff;
}
