/* ── Rogue Bot Dashboard — CSS ───────────────────────────── */
:root {
    --bg:          #0a1419;
    --bg-card:     #12202a;
    --bg-elevated: #1a2f38;
    --border:      #2a4652;
    --text:        #f0f4f8;
    --text-muted:  #8b9eb0;
    --primary:     #4a8c9e;
    --primary-hover:#5aa5b8;
    --primary-light:#7fd9e8;
    --accent:      #7fd9e8;
    --accent-hover:#a8e6f5;
    --danger:      #ef4444;
    --success:     #10b981;
    --warning:     #f59e0b;
    --info:        #3b82f6;
    --radius:      12px;
    --radius-sm:   8px;
    --shadow:      0 4px 6px -1px rgba(0, 0, 0, 0.5), 0 2px 4px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg:   0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(74, 140, 158, 0.2);
    --glow:        0 0 3px rgba(127, 217, 232, 0.3);
    --glow-strong: 0 0 3px rgba(127, 217, 232, 0.5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    overflow-x: clip;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ────────────────────────────────────────────── */
.navbar {
    background: transparent;
    position: sticky;
    top: 0;
    z-index: 1201;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
}
.navbar.scrolled {
    background: rgba(10, 20, 25, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(127, 217, 232, 0.08);
    padding: 0.25rem 0;
}
.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}
.nav-brand {
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}
.nav-brand:hover { 
    text-decoration: none; 
    transform: translateY(-2px);
    filter: drop-shadow(0 4px 12px rgba(127, 217, 232, 0.35));
}
.brand-logo { height: 56px; width: auto; display: block; image-rendering: -webkit-optimize-contrast; image-rendering: crisp-edges; }

/* ── Center nav ───────────────────────────────────────── */
.nav-pill {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(18, 32, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(127, 217, 232, 0.1);
    border-radius: 12px;
    padding: 0.4rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.nav-pill .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    position: relative;
}
.nav-pill .nav-link:hover {
    color: var(--accent);
    background: rgba(127, 217, 232, 0.12);
    text-decoration: none;
    transform: translateY(-1px);
}
.nav-pill .nav-link.active {
    color: var(--accent);
    background: rgba(127, 217, 232, 0.15);
    box-shadow: 0 2px 8px rgba(127, 217, 232, 0.2);
}

/* ── Right side ───────────────────────────────────────── */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}
.btn-discord {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1.5rem;
    background: rgba(74, 140, 158, 0.15) !important;
    backdrop-filter: none !important;
    color: var(--accent) !important;
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(127, 217, 232, 0.2) !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none !important;
}
.btn-discord:hover {
    background: var(--accent) !important;
    color: var(--bg) !important;
    transform: translateY(-2px);
    
    text-decoration: none;
}
.btn-discord i { font-size: 1.1em; }
.nav-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: rgba(74, 140, 158, 0.15);
    color: var(--accent);
    border-radius: 10px;
    border: 1px solid rgba(127, 217, 232, 0.2);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}
.nav-icon-btn:hover {
    background: var(--accent);
    color: var(--bg);
    transform: translateY(-2px);
    
    text-decoration: none;
}
.nav-icon-btn i { font-size: 1.1rem; }
.nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.5rem 0.35rem 0.35rem;
    background: rgba(18, 32, 42, 0.5);
    border: 1px solid rgba(127, 217, 232, 0.15);
    border-radius: 12px;
    transition: all 0.25s;
}
.nav-user:hover {
    background: rgba(18, 32, 42, 0.7);
    border-color: rgba(127, 217, 232, 0.25);
}
.nav-avatar { 
    width: 32px; 
    height: 32px; 
    border-radius: 8px; 
    border: 2px solid rgba(127, 217, 232, 0.3);
    transition: all 0.25s;
}
.nav-avatar:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}
.nav-logout {
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    transition: all 0.25s;
}
.nav-logout:hover {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.12);
    text-decoration: none;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.65rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid rgba(127, 217, 232, 0.15);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    background: rgba(10, 20, 25, 0.5);
    color: var(--text);
}
.btn-primary { 
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: #fff;
    border: 1px solid rgba(127, 217, 232, 0.3);
    
}
.btn-primary:hover { 
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    transform: translateY(-2px);
    
    border-color: var(--accent-hover);
}
.btn-outline { 
    background: transparent; 
    color: var(--text); 
    border: 2px solid rgba(127, 217, 232, 0.3);
}
.btn-outline:hover { 
    border-color: var(--accent); 
    color: var(--accent);
    background: rgba(127, 217, 232, 0.15);
    transform: translateY(-1px);
    
}
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.75rem 2rem; font-size: 1.05rem; }

/* ── Layout ────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.main-content { flex: 1; padding: 0; }

/* ── Footer ────────────────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 3.5rem 0 2rem;
    background: var(--bg-card);
    margin-top: auto;
}
.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
}
.footer-brand {
    max-width: 320px;
}
.footer-logo {
    height: 42px;
    width: auto;
    margin-bottom: 1rem;
}
.footer-tagline {
    color: var(--text-muted);
    font-size: .9rem;
    margin-bottom: .5rem;
}
.footer-copyright {
    color: var(--text-muted);
    font-size: .8rem;
    opacity: .7;
    margin: 0;
}
.footer-links {
    display: flex;
    gap: 4rem;
    justify-content: flex-end;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.footer-heading {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text);
    margin-bottom: .5rem;
}
.footer-link {
    color: var(--text-muted);
    font-size: .875rem;
    transition: color .2s;
}
.footer-link:hover {
    color: var(--accent);
    text-decoration: none;
}

/* ── Hero ──────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 2rem 0 4rem;
}
.hero-logo { 
    max-width: 250px; 
    width: 100%; 
    height: auto; 
    margin: 0 auto 2rem; 
    display: block;
    animation: float 3s ease-in-out infinite, glow 2s ease-in-out infinite alternate;
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}
@keyframes glow {
    from { filter: drop-shadow(0 1px 1px rgba(127, 217, 232, 0.4)) drop-shadow(0 0 2px rgba(127, 217, 232, 0.1)); }
    to { filter: drop-shadow(0 1px 1px rgba(127, 217, 232, 0.5)) drop-shadow(0 0 2px rgba(127, 217, 232, 0.1)); }
}
.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-weight: 500;
}
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Stats Grid ────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.25rem;
    margin-bottom: 3rem;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(74, 140, 158, 0.2);
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(74, 140, 158, 0.08) 0%, var(--bg-card) 100%);
}
.stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Features ──────────────────────────────────────────── */
.section-title {
    text-align: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}
.feature-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 2rem;
    text-align: center;
    justify-content: center;
}
.feature-card {
    flex: 0 1 calc(25% - 1rem);
    min-width: 260px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--accent); box-shadow: var(--glow); }
.feature-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.feature-card h3 { margin-bottom: 0.4rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* ── Guild (server) Grid ───────────────────────────────── */
.page-header { 
    margin-bottom: 2rem; 
    text-align: center;
}
.page-header h1 { 
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.text-muted { 
    color: var(--text-muted); 
    font-size: 0.95rem;
}
.text-muted-id { color: var(--text-muted); font-size: 0.75rem; font-weight: 400; }

.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}
.guild-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    transition: border-color 0.2s, transform 0.2s;
    color: var(--text);
}
.guild-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(74, 140, 158, 0.25);
}
.guild-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}
.guild-icon-placeholder {
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-muted);
}
.guild-name { font-weight: 600; text-align: center; }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

/* ── Embed Builder (side-by-side editor + preview) ───────── */
.embed-builder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    align-items: start;
}
.eb-editor { min-width: 0; }
.eb-preview { position: sticky; top: 76px; }
.preview-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.form-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.3rem;
}

/* Variables reference box */
.variables-box {
    background: rgba(74, 140, 158, 0.1);
    border: 1px solid rgba(74, 140, 158, 0.3);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}
.variables-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}
.variables-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.var-tag {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--accent);
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: all;
}
.var-tag:hover { background: rgba(127, 217, 232, 0.2); border-color: var(--accent); box-shadow: var(--glow); }
.var-tag.var-copied {
    background: rgba(87,242,135,0.15);
    border-color: #57f287;
    color: #57f287;
}
.variables-desc {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    font-size: 0.72rem;
    color: var(--text-muted);
}
.variables-desc code {
    color: var(--accent);
    font-size: 0.72rem;
}

/* Accent button */
.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: var(--bg);
    border: none;
    font-weight: 700;
}
.btn-accent:hover { 
    background: linear-gradient(135deg, var(--accent-hover) 0%, #c7f3ff 100%); 
    transform: translateY(-2px);
}

/* Input with emoji picker button */
.input-with-emoji {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0;
}
.input-with-emoji .input { flex: 1; padding-right: 2.5rem; }
.emoji-picker-btn {
    position: absolute;
    right: 0.4rem;
    top: 0.45rem;
    background: none;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
    padding: 0.15rem 0.25rem;
    border-radius: 4px;
    opacity: 0.5;
    transition: opacity 0.15s;
    line-height: 1;
}
.emoji-picker-btn:hover { opacity: 1; background: rgba(255,255,255,0.06); }

/* Emoji Picker popup */
.emoji-picker-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
}
.emoji-picker-overlay.active { display: block; }

.emoji-picker {
    display: none;
    position: fixed;
    z-index: 1000;
    width: 352px;
    max-height: 420px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
    flex-direction: column;
    overflow: hidden;
}
.emoji-picker.active { display: flex; }

/* ── Multi-Select Dropdown ────────────────────── */
.multi-select-dropdown { position: relative; }
.multi-select-toggle {
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; user-select: none;
}
.multi-select-options {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-elevated); border: 1px solid var(--border);
    border-radius: 0.5rem; margin-top: 0.25rem; z-index: 50;
    max-height: 200px; overflow-y: auto; padding: 0.25rem 0;
}
.multi-select-dropdown.open .multi-select-options { display: block; }
.multi-select-dropdown.open { z-index: 51; }
.card:has(.multi-select-dropdown.open) { overflow: visible; }
.multi-select-option {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 0.75rem; cursor: pointer; font-size: 0.9rem;
}
.multi-select-option:hover { background: rgba(255,255,255,0.05); }
.multi-select-option input[type=checkbox] { accent-color: var(--accent); }

.ep-header {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    gap: 0.35rem;
    border-bottom: 1px solid var(--border);
}
.ep-search {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
}
.ep-search:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(74, 140, 158, 0.2), var(--glow); }
.ep-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0 0.3rem;
    line-height: 1;
}
.ep-close:hover { color: var(--text); }

.ep-tabs {
    display: flex;
    overflow-x: auto;
    padding: 0.25rem 0.5rem;
    gap: 0.15rem;
    border-bottom: 1px solid var(--border);
}
.ep-tab {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.3rem 0.45rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.12s;
}
.ep-tab:hover { background: rgba(255,255,255,0.06); color: var(--text); }
.ep-tab.active { background: rgba(74, 140, 158, 0.25); color: var(--accent); }

.ep-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 2px;
    padding: 0.5rem;
    overflow-y: auto;
    flex: 1;
    max-height: 300px;
}
.ep-emoji {
    background: none;
    border: none;
    font-size: 1.4rem;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
    line-height: 1;
}
.ep-emoji:hover { background: rgba(255,255,255,0.1); }
.ep-emoji img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.ep-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 2rem 0;
    font-size: 0.85rem;
}

/* Discord message mock */
.discord-message {
    background: #2f3136;
    border-radius: 8px;
    padding: 1rem 1rem 1rem 4.25rem;
    position: relative;
    font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 0.9375rem;
    color: #dcddde;
}
.dm-avatar {
    position: absolute;
    left: 1rem;
    top: 1rem;
}
.dm-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}
img.dm-avatar-img {
    display: block;
    object-fit: cover;
    background: transparent;
}
.dm-body { min-width: 0; }
.dm-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; }
.dm-botname { font-weight: 600; color: #fff; font-size: 0.95rem; }
.dm-badge {
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    box-shadow: var(--glow);
}
.dm-time { font-size: 0.75rem; color: #72767d; }

/* Discord embed */
.discord-embed {
    display: grid;
    grid-template-columns: 4px 1fr;
    grid-template-rows: auto auto;
    border-radius: 4px;
    overflow: hidden;
    background: #2f3136;
    border: 1px solid rgba(0,0,0,0.1);
    max-width: 520px;
    margin-top: 0.25rem;
}
.de-color {
    grid-row: 1 / -1;
    border-radius: 4px 0 0 4px;
}
.de-content {
    display: flex;
    padding: 0.5rem 1rem 0.5rem 0.75rem;
    gap: 1rem;
}
.de-main { flex: 1; min-width: 0; }
.de-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 0.25rem;
    word-break: break-word;
}
.de-description {
    font-size: 0.875rem;
    color: #dcddde;
    line-height: 1.375rem;
    white-space: pre-wrap;
    word-break: break-word;
}
.de-mention {
    color: #dee0fc;
    background: rgba(88,101,242,0.3);
    border-radius: 3px;
    padding: 0 2px;
    font-weight: 500;
}
.de-empty { color: #72767d; font-style: italic; }
.de-emoji {
    width: 1.375em;
    height: 1.375em;
    vertical-align: -0.3em;
    object-fit: contain;
    margin: 0 0.05em;
}

.de-image-wrap { margin-top: 0.5rem; }
.de-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    object-fit: contain;
}
.de-thumb-wrap { flex-shrink: 0; }
.de-thumb {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
}
.de-footer {
    grid-column: 2;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    color: #72767d;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.de-footer-icon {
    width: 20px; height: 20px; border-radius: 50%;
}
.de-author {
    grid-column: 2;
    padding: 0.5rem 0.75rem 0;
    font-size: 0.8rem;
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.de-author-icon {
    width: 24px; height: 24px; border-radius: 50%;
}

/* ── Guild Dashboard Layout ─────────────────────────────── */
.guild-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.5rem;
    align-items: start;
}

/* Sidebar */
.guild-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.4rem 0;
    position: sticky;
    top: 76px;
    overflow-y: auto;
    max-height: calc(100vh - 92px);
}
.guild-sidebar::-webkit-scrollbar { width: 4px; }
.guild-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.sidebar-section { padding: 0.15rem 0; }
.sidebar-section + .sidebar-section { border-top: none; }
.sidebar-label {
    padding: 0.55rem 0.75rem 0.3rem;
    margin: 0.35rem 0.6rem 0.1rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    opacity: 0.6;
    border-left: 2px solid var(--accent);
    border-bottom: none;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.75rem 0.42rem 1.1rem;
    margin: 1px 0.45rem;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none !important;
    border-radius: var(--radius-sm);
    border-left: 2px solid transparent;
}
.sidebar-link:hover {
    color: var(--text);
    background: rgba(127, 217, 232, 0.07);
    border-left-color: var(--primary);
}
.sidebar-link.active {
    color: var(--accent);
    background: rgba(127, 217, 232, 0.12);
    border-left-color: var(--accent);
    font-weight: 600;
}

/* Font Awesome icon helpers */
.sidebar-label i { margin-right: 0.25em; font-size: 0.7em; opacity: 0.8; }
.sidebar-link i { width: 1.1em; text-align: center; font-size: 0.9em; flex-shrink: 0; }
.panel-title i, .card-header i { margin-right: 0.4em; opacity: 0.85; }
.btn i { margin-right: 0.35em; }
.feature-icon i { font-size: 2rem; }
.module-filter i { margin-right: 0.3em; }
.module-tab i { margin-right: 0.3em; }
.module-title i { margin-right: 0.4em; color: var(--accent); }

/* Tab panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.panel-title { font-size: 1.35rem; margin-bottom: 1.25rem; }

/* Form elements */
.form-group { margin-bottom: 0.85rem; }
.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}
.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}
.form-row .form-group { flex: 1; min-width: 160px; }
.textarea {
    resize: vertical;
    min-height: 60px;
    font-family: inherit;
}
.color-input {
    height: 38px;
    padding: 2px 4px;
    cursor: pointer;
}
select.input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%237a8299' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}
.btn-row { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.btn-danger-outline { 
    border-color: var(--danger); 
    color: var(--danger);
}
.btn-danger-outline:hover { 
    background: rgba(237,66,69,0.15); 
    border-color: rgba(237, 66, 69, 0.7);
}

/* Toggle switch */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-weight: 500;
}
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 24px;
    transition: 0.2s;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: 0.2s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); border-color: var(--accent); box-shadow: var(--glow); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); background: #fff; }

/* Checkbox inline */
.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    cursor: pointer;
    margin-right: 1rem;
    color: var(--text);
}
.checkbox-label input[type="checkbox"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

/* Tags with remove button */
.tag-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    margin-left: 0.3rem;
    padding: 0;
    opacity: 0.7;
}
.tag-remove:hover { opacity: 1; }

/* Item list (for channel lists, etc.) */
.item-list { display: flex; flex-direction: column; gap: 0.4rem; }
.item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
}
.item-info { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.mini-tag {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background: rgba(74, 140, 158, 0.2);
    color: var(--accent);
    font-weight: 600;
}
.mini-tag.tag-success { background: rgba(87,242,135,0.12); color: var(--success); }

/* ── Guild Settings Page ───────────────────────────────── */
.breadcrumb {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 0.4rem; }

.guild-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.guild-header-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

/* ── Cards ─────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 1rem; }
.card-body { padding: 1.25rem; }

/* ── Inputs ────────────────────────────────────────────── */
.input-group { display: flex; gap: 0.5rem; margin-top: 0.75rem; }
.input {
    flex: 1;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus { 
    border-color: var(--accent); 
    box-shadow: 0 0 0 3px rgba(74, 140, 158, 0.2), var(--glow);
}

.feedback { margin-top: 0.5rem; font-size: 0.85rem; min-height: 1.2rem; }
.feedback-success { color: var(--success); }
.feedback-error { color: var(--danger); }

/* ── Toast Notifications ────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.6rem;
    z-index: 9999;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 280px;
    max-width: 380px;
    padding: 0.85rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    box-shadow: 0 4px 16px rgba(0,0,0,0.45);
    pointer-events: all;
    animation: toast-in 0.25s ease forwards;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.toast-hiding {
    opacity: 0;
    transform: translateX(120%);
}
@keyframes toast-in {
    from { opacity: 0; transform: translateX(120%); }
    to   { opacity: 1; transform: translateX(0); }
}
.toast-icon { font-size: 1.15rem; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-size: 0.875rem; font-weight: 600; color: var(--text); margin-bottom: 0.15rem; }
.toast-msg   { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; }
.toast-close {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 1rem; padding: 0; line-height: 1;
    flex-shrink: 0; opacity: 0.6;
    transition: opacity 0.15s;
}
.toast-close:hover { opacity: 1; }
.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--accent); }
.toast-warning { border-left: 3px solid #f0b132; }

/* ── Custom Modal ───────────────────────────────────────── */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    z-index: 10000;
    animation: fade-in 0.15s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 1.5);
    padding: 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    animation: modal-in 0.2s cubic-bezier(.34,1.56,.64,1);
}
@keyframes modal-in {
    from { opacity: 0; transform: scale(0.92) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-icon { font-size: 2.25rem; text-align: center; margin-bottom: 0.75rem; }
.modal-title {
    font-size: 1.1rem; font-weight: 700;
    color: var(--text); text-align: center; margin-bottom: 0.5rem;
}
.modal-message {
    font-size: 0.9rem; color: var(--text-muted);
    text-align: center; line-height: 1.6; margin-bottom: 1.5rem;
    white-space: pre-line;
}
.modal-bullets {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin: -0.5rem 0 1.25rem;
    font-size: 0.85rem; color: var(--text-muted); line-height: 1.8;
}
.modal-bullets li { list-style: none; }
.modal-bullets li::before { content: '•  '; color: var(--accent); }
.modal-actions { display: flex; gap: 0.75rem; justify-content: center; }
.modal-actions .btn { min-width: 110px; }

/* ── Tags ──────────────────────────────────────────────── */
.tag-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}
.tag-danger { background: rgba(237, 66, 69, 0.15); color: var(--danger); }

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.status-active { background: rgba(87, 242, 135, 0.15); color: var(--success); }
.status-inactive { background: rgba(122, 130, 153, 0.15); color: var(--text-muted); }

.hint { font-size: 0.8rem; margin-top: 0.5rem; }
code {
    background: var(--bg-elevated);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.85em;
}

.quick-links { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* ── Tables ────────────────────────────────────────────── */
.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.table th, .table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.table th {
    background: var(--bg-elevated);
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(74, 140, 158, 0.06); }
.rank { font-weight: 700; color: var(--accent); }
.highlight { font-weight: 600; color: var(--accent); }

/* ── Tabs ──────────────────────────────────────────────── */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.2rem;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.tab:hover { border-color: var(--accent); color: var(--text); }
.tab.active { background: var(--primary); border-color: var(--accent); color: #fff; box-shadow: var(--glow); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Commands Page ─────────────────────────────────────── */
.command-search {
    margin-bottom: 1.25rem;
}
.command-search .input {
    width: 100%;
    max-width: 420px;
}
.cmd-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}
.cmd-tab {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.4rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}
.cmd-tab:hover { border-color: var(--accent); color: var(--text); }
.cmd-tab.active { background: var(--primary); border-color: var(--accent); color: #fff; box-shadow: var(--glow); }

.cmd-category { margin-bottom: 2rem; }
.cmd-category-title { font-size: 1.3rem; margin-bottom: 0.3rem; }

.cmd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}
/* Commands Grid Layout */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}
.cmd-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    transition: all 0.3s ease;
    cursor: default;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.cmd-card:hover { 
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(74, 140, 158, 0.25), 0 0 0 1px var(--accent);
}

/* Group Command Styles */
.cmd-card.group-command {
    cursor: pointer;
    border-left: 4px solid var(--primary);
    background: linear-gradient(90deg, rgba(74, 140, 158, 0.1) 0%, var(--bg-card) 15%);
}
.cmd-card.group-command:hover {
    background: linear-gradient(90deg, rgba(74, 140, 158, 0.18) 0%, rgba(127, 217, 232, 0.08) 50%, var(--bg-card) 100%);
    border-left-color: var(--accent);
    box-shadow: 0 2px 8px rgba(74, 140, 158, 0.3), inset 3px 0 0 var(--accent);
}
.cmd-card.group-command .cmd-name::after {
    content: '▼';
    margin-left: 0.75rem;
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.3s ease;
}
.cmd-card.group-command.expanded .cmd-name::after {
    transform: rotate(-180deg);
}
.cmd-subcommands {
    display: none;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}
.cmd-card.expanded .cmd-subcommands {
    display: block;
}
.subcmd-item {
    padding: 0.75rem 1rem;
    margin: 0.5rem 0;
    background: linear-gradient(135deg, rgba(74, 140, 158, 0.12) 0%, rgba(74, 140, 158, 0.05) 100%);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
    transition: all 0.2s ease;
}
.subcmd-item:hover {
    background: linear-gradient(135deg, rgba(74, 140, 158, 0.2) 0%, rgba(127, 217, 232, 0.1) 100%);
    transform: translateX(6px);
    border-left-color: var(--accent);
    box-shadow: 0 1px 4px rgba(74, 140, 158, 0.3);
}
.subcmd-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.35rem;
    font-family: 'Monaco', 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(127, 217, 232, 0.5);
}
.subcmd-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.subcmd-perms {
    font-size: 0.78rem;
    color: var(--text-muted);
    opacity: 0.75;
    margin-top: 0.25rem;
    font-style: italic;
}
.cmd-name {
    margin-bottom: 0.5rem;
}
.cmd-name code {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(74, 140, 158, 0.15);
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(74, 140, 158, 0.3);
}
.cmd-alias {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 0.5rem;
}
.cmd-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.cmd-perm {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    background: rgba(254, 231, 92, 0.1);
    color: var(--warning);
    border-radius: 4px;
}

/* ── Module Tabs ───────────────────────────────────────── */
.module-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 3rem;
}
.module-tab {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.module-tab:hover:not(.active) {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(74, 140, 158, 0.2) 0%, rgba(127, 217, 232, 0.1) 100%);
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(74, 140, 158, 0.3);
}
.module-tab.active {
    background: var(--primary) !important;
    color: white !important;
    border-color: var(--accent) !important;
    box-shadow: 0 2px 6px rgba(74, 140, 158, 0.4) !important;
    transform: translateY(-1px);
}

/* ── Module Sections ───────────────────────────────────── */
.module-section {
    margin-bottom: 3rem;
}
.module-title {
    font-size: 1.85rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.subcategory-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--text);
}

/* ── Module Management Styles ─────────────────────────────── */
.module-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}
.module-item:last-child { border-bottom: none; }
.module-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}
.module-info strong {
    color: var(--text);
    font-size: 0.95rem;
}
.module-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.module-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.module-status {
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 70px;
    text-align: right;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success {
    background: rgba(87, 242, 135, 0.15);  
    color: var(--success);
    border: 1px solid rgba(87, 242, 135, 0.3);
}
.badge-warning {
    background: rgba(254, 231, 92, 0.15);
    color: var(--warning);
    border: 1px solid rgba(254, 231, 92, 0.3);
}
.badge-danger {
    background: rgba(237, 66, 69, 0.15);
    color: var(--danger);
    border: 1px solid rgba(237, 66, 69, 0.3);
}
.badge-info {
    background: rgba(74, 140, 158, 0.2);
    color: var(--accent);
    border: 1px solid rgba(74, 140, 158, 0.4);
}
.cmd-aliases {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}
.cmd-aliases code {
    font-size: 0.78rem;
}

/* ── Disabled Commands — Category Tabs ─────────────── */
.cmd-search-wrap {
    margin-bottom: 1rem;
}
.cmd-search-wrap .input {
    width: 100%;
}
.cmd-cat-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.cmd-cat-tab {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.cmd-cat-tab:hover {
    border-color: var(--primary);
    color: var(--text);
}
.cmd-cat-tab.active {
    background: var(--primary);
    border-color: var(--accent);
    color: #fff;
    box-shadow: var(--glow);
}
.cmd-toggle-item {
    padding: 0.7rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.cmd-toggle-item:last-child { border-bottom: none; }
.cmd-desc {
    font-size: 0.88rem;
    color: var(--text);
    margin-top: 0.35rem;
    line-height: 1.4;
}
.cmd-perm, .cmd-cooldown {
    display: inline-block;
    font-size: 0.75rem;
    margin-top: 0.4rem;
    margin-right: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background: rgba(122, 130, 153, 0.1);
    color: var(--text-muted);
}
.cmd-perm { background: rgba(254, 231, 92, 0.1); color: var(--warning); }

/* ── Docs Page ─────────────────────────────────────────── */
.docs-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}
.docs-sidebar {
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}
.docs-sidebar::-webkit-scrollbar { width: 3px; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.docs-nav-section { margin-bottom: 1.25rem; }
.docs-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    opacity: 0.6;
    padding: 0.25rem 0.75rem;
    margin-bottom: 0.25rem;
    border-left: 2px solid transparent;
}
.docs-nav-link {
    display: block;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-left: 2px solid transparent;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all 0.15s ease;
}
.docs-nav-link:hover {
    color: var(--text);
    background: rgba(127, 217, 232, 0.05);
    border-left-color: var(--border);
    text-decoration: none;
}
.docs-nav-link.active {
    color: var(--accent);
    background: rgba(127, 217, 232, 0.1);
    border-left-color: var(--accent);
    font-weight: 600;
}

/* Docs content */
.docs-content { min-width: 0; }
.docs-section {
    margin-bottom: 3rem;
    scroll-margin-top: 80px;
}
.docs-section h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.docs-section h1 i { color: var(--accent); margin-right: 0.3em; }
.docs-section h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border);
}
.docs-section h2 i { color: var(--accent); margin-right: 0.3em; font-size: 0.9em; }
.docs-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: var(--text);
}
.docs-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.docs-section h4 i { color: var(--accent); margin-right: 0.3em; }
.docs-section p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}
.docs-section ol, .docs-section ul {
    color: var(--text-muted);
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.8;
}
.docs-section a { color: var(--accent); }
.docs-section a:hover { text-decoration: underline; }
.docs-lead {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Code blocks */
.docs-code {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
    line-height: 1.9;
    font-size: 0.88rem;
}
.docs-code code {
    background: rgba(127, 217, 232, 0.1);
    color: var(--accent);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Fira Code', 'Consolas', monospace;
}
.docs-section code {
    background: rgba(127, 217, 232, 0.1);
    color: var(--accent);
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'Fira Code', 'Consolas', monospace;
}

/* Callouts */
.docs-callout {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border-left: 3px solid;
    margin-bottom: 1.25rem;
}
.docs-callout i { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.15rem; }
.docs-callout strong { display: block; margin-bottom: 0.15rem; color: var(--text); }
.docs-callout div { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; }
.docs-callout.info {
    background: rgba(59, 130, 246, 0.06);
    border-color: var(--info);
}
.docs-callout.info i { color: var(--info); }
.docs-callout.warning {
    background: rgba(245, 158, 11, 0.06);
    border-color: var(--warning);
}
.docs-callout.warning i { color: var(--warning); }
.docs-callout.tip {
    background: rgba(16, 185, 129, 0.06);
    border-color: var(--success);
}
.docs-callout.tip i { color: var(--success); }

/* Tables */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.88rem;
}
.docs-table th {
    text-align: left;
    padding: 0.6rem 0.85rem;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    color: var(--text);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.docs-table td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid rgba(42, 70, 82, 0.5);
    color: var(--text-muted);
}
.docs-table tr:hover td { background: rgba(127, 217, 232, 0.03); }

/* Badges */
.docs-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}
.docs-badge.owner { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.docs-badge.admin { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.docs-badge.mod { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.docs-badge.everyone { background: rgba(16, 185, 129, 0.15); color: #10b981; }

/* Feature grid */
.docs-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}
.docs-feature-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: border-color 0.2s ease;
}
.docs-feature-item:hover { border-color: var(--primary); }
.docs-feature-item p { font-size: 0.85rem; margin-bottom: 0; }

/* FAQ */
.docs-faq-item {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(42, 70, 82, 0.4);
}
.docs-faq-item:last-child { border-bottom: none; }
.docs-faq-item h3 { color: var(--text); margin-top: 0; }
.docs-faq-item p { margin-bottom: 0; }

/* ── Status Page ───────────────────────────────────────── */
.status-page { padding: 2rem 0 4rem; max-width: 800px; margin: 0 auto; }
.status-heading {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    color: var(--text);
}
.status-sub {
    text-align: center;
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}
.status-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}
.status-banner.online {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.06);
}
.status-banner.offline {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.06);
}
.status-dot {
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}
.status-dot.offline {
    background: var(--danger);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}
.status-text {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text);
}
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}
.status-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.status-card:hover {
    border-color: var(--primary);
    box-shadow: var(--glow);
}
.status-card-icon {
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}
.status-card-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}
.status-card-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.25rem;
}
.status-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.status-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}
.status-section-title i {
    color: var(--accent);
    margin-right: 0.4em;
}
.latency-chart {
    width: 100%;
    min-height: 160px;
}
.latency-chart canvas {
    width: 100%;
    display: block;
}

/* ── Responsive ────────────────────────────────────────── */

/* Hamburger button */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 38px;
    height: 38px;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0 9px;
    transition: border-color .2s;
}
.nav-hamburger:hover { border-color: var(--accent); }
.nav-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #f0f4f8;
    border-radius: 2px;
    transition: background .2s;
}
.nav-hamburger:hover span { background: var(--accent); }

/* Mobile drawer */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 1203;
    opacity: 0;
    transition: opacity .3s;
}
.mobile-nav-overlay.open { display: block; opacity: 1; }
.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(85vw, 320px);
    height: 100dvh;
    background: linear-gradient(180deg, rgba(10, 20, 25, 0.98) 0%, rgba(10, 20, 25, 0.96) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(127, 217, 232, 0.2);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(127, 217, 232, 0.05) inset;
    z-index: 1204;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    overflow-x: hidden;
}
.mobile-nav-drawer.open { transform: translateX(0); }
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(127, 217, 232, 0.15);
}
.mobile-nav-header img {
    filter: drop-shadow(0 2px 8px rgba(127, 217, 232, 0.3));
}
.mobile-nav-close {
    background: rgba(74, 140, 158, 0.15);
    border: 1px solid rgba(127, 217, 232, 0.2);
    color: var(--accent);
    font-size: 1.2rem;
    cursor: pointer;
    padding: .5rem .7rem;
    border-radius: 8px;
    transition: all .25s;
}
.mobile-nav-close:hover { 
    background: var(--accent);
    color: var(--bg);
    border-color: var(--accent);
    transform: scale(1.05);
}
.mobile-nav-links { display: flex; flex-direction: column; gap: .5rem; }
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    color: var(--text);
    font-size: .95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    background: transparent;
}
.mobile-nav-link:hover { 
    color: var(--accent); 
    background: rgba(127,217,232,.12); 
    text-decoration: none;
    border-color: rgba(127,217,232,.25);
    transform: translateX(4px);
}
.mobile-nav-link i { 
    width: 20px; 
    text-align: center; 
    font-size: 1rem;
    color: var(--accent);
    transition: transform .25s;
}
.mobile-nav-link:hover i {
    transform: scale(1.1);
}
.mobile-nav-divider { 
    height: 1px; 
    background: linear-gradient(90deg, transparent, rgba(127, 217, 232, 0.2), transparent); 
    margin: 1.5rem 0; 
}
.mobile-nav-cta { 
    margin-top: auto; 
    padding-top: 1rem; 
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.mobile-nav-cta .btn,
.mobile-nav-cta .btn-discord,
.mobile-nav-cta .btn-primary,
.mobile-nav-cta .btn-outline {
    width: 100% !important;
    justify-content: center !important;
    padding: 0.85rem 1.5rem !important;
    font-size: 0.95rem !important;
    text-align: center;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .hero-logo { max-width: 180px; }
    .brand-logo { height: 48px; }
    .nav-container { padding: 0.5rem 1.5rem; }
    .navbar.scrolled { padding: 0.25rem 0; }
    .nav-pill { display: none; }
    .nav-hamburger { display: flex; }
    /* Hide desktop login button on very small screens, drawer handles it */
    .nav-right .btn-discord { display: none; }
    .nav-right .nav-user { display: none; }
    .footer-content { grid-template-columns: 1fr; gap: 2.5rem; }
    .footer-links { justify-content: flex-start; gap: 3rem; }
    .commands-grid { grid-template-columns: 1fr; }
    .settings-grid { grid-template-columns: 1fr; }
    .guild-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .guild-layout { grid-template-columns: 1fr; }
    .guild-sidebar {
        position: static;
        padding: 0;
        background: var(--bg-card);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        margin-bottom: 1rem;
        overflow: hidden;
    }
    .sidebar-section {
        display: block;
        padding: 0;
        border-bottom: 1px solid var(--border);
    }
    .sidebar-section:last-child { border-bottom: none; }
    .sidebar-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.7rem 1rem;
        margin: 0;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text);
        text-transform: none;
        letter-spacing: 0;
        opacity: 1;
        transition: background 0.2s;
        -webkit-tap-highlight-color: transparent;
    }
    .sidebar-label:hover { background: rgba(127, 217, 232, 0.05); }
    .sidebar-label::after {
        content: '\f078';
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        font-size: 0.65rem;
        color: var(--text-muted);
        transition: transform 0.25s ease;
    }
    .sidebar-section.mobile-open .sidebar-label::after {
        transform: rotate(180deg);
    }
    .sidebar-section .sidebar-link {
        display: none;
        padding: 0.55rem 1rem 0.55rem 0rem;
        font-size: 0.82rem;
        border-radius: 0;
        border-left: none;
    }
    .sidebar-section.mobile-open .sidebar-link {
        display: flex;
    }
    .sidebar-link.active {
        border-left: 3px solid var(--accent);
        background: rgba(74, 140, 158, 0.15);
        color: var(--accent);
        padding-left: calc(2.2rem - 3px);
    }
    .sidebar-link i { margin-right: 0.4rem; font-size: 0.8rem; }
    .guild-header {
        flex-direction: row;
        text-align: center;
    }
    .form-row { flex-direction: column; }
    .embed-builder { grid-template-columns: 1fr; }
    .eb-preview { position: static; }
    .status-page { padding: 1.5rem 1rem 3rem; }
    .status-grid { grid-template-columns: repeat(2, 1fr); }
    .docs-layout { grid-template-columns: 1fr; padding: 1rem; }
    .docs-sidebar { display: none; }
    .docs-feature-grid { grid-template-columns: 1fr; }
    .module-tabs {
        gap: 0.4rem;
        padding: 0 0.25rem;
    }
    .module-tab {
        padding: 0.45rem 0.7rem;
        font-size: 0.75rem;
        flex: 0 0 auto;
    }
    .module-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 0.5rem;
    }
    .module-tabs::-webkit-scrollbar { display: none; }
    .module-section { padding: 1rem; }
    .module-title { font-size: 1.3rem; }
    .subcategory-title { font-size: 1rem; margin: 1.25rem 0 0.75rem; }

    /* ── Mobile: input-group & btn-row wrapping ── */
    .input-group {
        flex-wrap: wrap;
    }
    .input-group .input {
        flex: 1 1 100%;
        min-width: 0;
    }
    .input-group .btn {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
    }
    .btn-row {
        flex-wrap: wrap;
    }
    .btn-row .btn {
        flex: 1 1 calc(50% - 0.25rem);
        justify-content: center;
    }

    /* ── Tickets mobile fixes ── */
    .tk-base-grid { grid-template-columns: 1fr !important; }
    .tk-base-grid .span2 { grid-column: span 1 !important; }
    .tk-btn-style-picker { flex-wrap: wrap; }
    .tk-bs-opt label { flex: 1 1 auto; justify-content: center; }
    .tk-toggle-row { flex-wrap: wrap; gap: .5rem; }
    .tk-toggle-row input[type=number] { width: 100% !important; }
    /* Stack Label/Emoji and Title/Color rows vertically */
    #tk-editor-wrap .form-row { flex-direction: column !important; gap: 0 !important; }
    #tk-editor-wrap .form-row.tk-title-color-row { flex-direction: row !important; align-items: flex-end !important; gap: .65rem !important; }
    #tk-editor-wrap .form-row.tk-title-color-row .form-group { flex: unset !important; width: auto !important; min-width: 0 !important; margin-left: 0 !important; }
    #tk-editor-wrap .form-row.tk-title-color-row .form-group:first-child { flex: 1 !important; }
    #tk-editor-wrap .form-row .form-group {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        width: 100% !important;
        margin-left: 0 !important;
    }
    /* Emoji and color picker stay compact — don't fill the whole row */
    #tk-editor-wrap .input-with-emoji { display: flex; width: fit-content; }
    #tk-editor-wrap .input-with-emoji .input { width: 90px !important; }
    #tk-editor-wrap input[type=color] { width: 50px !important; }
    /* Textarea full width */
    #tk-editor-wrap textarea.input { width: 100% !important; box-sizing: border-box; }
    /* Configured ticket type rows */
    #tk-types-list > div > div:first-child { flex-wrap: wrap; gap: .5rem; }
    #tk-types-list > div > div:first-child > div:last-child {
        width: 100%;
        display: flex;
        justify-content: flex-end;
    }
    .tk-type-row-send { flex-wrap: wrap; }
    .tk-type-row-send .input { flex: 1 1 100%; }
    /* embed-builder in tickets stacks editor then preview */
    #tk-editor-wrap { grid-template-columns: 1fr !important; }
}

/* ── RPG Cooldowns Admin ────────────────────────────────── */
.cd-table { width: 100%; border-collapse: collapse; }
.cd-table th {
    text-align: left; padding: 0.75rem 1rem; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}
.cd-table td { padding: 0.5rem 1rem; border-bottom: 1px solid rgba(42,70,82,0.3); }
.cd-table tbody tr:hover { background: rgba(74,140,158,0.06); }
.cd-overridden { background: rgba(245,158,11,0.06); }
.cd-overridden .cd-command { color: var(--warning); }
.cd-command {
    font-family: 'Consolas', 'Monaco', monospace; font-size: 0.85rem;
    color: var(--primary-light); background: rgba(74,140,158,0.1);
    padding: 0.15rem 0.45rem; border-radius: 4px;
}
.cd-input-wrap { display: flex; align-items: center; gap: 0.25rem; max-width: 120px; }
.cd-input {
    width: 80px; padding: 0.35rem 0.5rem; text-align: right;
    font-size: 0.9rem; font-family: 'Consolas', monospace;
}
.cd-unit { color: var(--text-muted); font-size: 0.85rem; }
.cd-input.cd-dirty { border-color: var(--warning); box-shadow: 0 0 0 1px var(--warning); }
.cd-btn-group { display: inline-flex; gap: 0.5rem; align-items: center; justify-content: flex-end; }
.cd-btn-group .btn-sm { padding: 0.4rem 0.65rem; font-size: 0.85rem; min-width: unset; }
.cd-btn-group .btn-sm i { margin: 0; font-size: 0.9rem; }
.cd-toast {
    position: fixed; bottom: 2rem; right: 2rem; padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 500;
    opacity: 0; transform: translateY(10px); pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
}
.cd-toast-show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.cd-toast-success { background: var(--success); color: #fff; }
.cd-toast-error { background: var(--danger); color: #fff; }
.badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--primary-light);
    background: rgba(74, 140, 158, 0.16);
    border: 1px solid rgba(74, 140, 158, 0.35);
    border-radius: 999px;
    padding: 0.1rem 0.5rem;
}

/* ── RPG Control Panel ──────────────────────────────────── */
.rpg-control-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}
.rpg-control-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}
.rpg-control-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
.rpg-card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #fff;
    box-shadow: var(--shadow);
}
.rpg-card-content h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem 0;
    color: var(--text);
}
.rpg-card-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}
.rpg-card-stats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}
.stat-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(127, 217, 232, 0.1);
    border: 1px solid rgba(127, 217, 232, 0.3);
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
}
.rpg-card-actions {
    margin-top: auto;
    padding-top: 0.5rem;
}
.rpg-card-actions .btn {
    width: 100%;
    justify-content: center;
}

@media (max-width: 768px) {
    .rpg-control-grid {
        grid-template-columns: 1fr;
    }
}

/* ── Game Mode Selection ───────────────────────────────────── */
.game-mode-option {
    transition: all 0.2s ease;
}

.game-mode-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.game-mode-option:active {
    transform: translateY(0);
}

/* ── RPG Settings Pages ──────────────────────────────────── */
.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(42, 70, 82, 0.3);
    gap: 2rem;
}
.setting-row:last-child {
    border-bottom: none;
}
.setting-label {
    flex: 1;
    min-width: 0;
}
.setting-label label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text);
    display: block;
    margin-bottom: 0.25rem;
}
.setting-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}
.setting-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}
.setting-input .input {
    width: 120px;
    text-align: right;
}
.setting-unit {
    font-size: 0.85rem;
    color: var(--text-muted);
    min-width: 20px;
}
.setting-modified {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: .3s;
    border-radius: 34px;
}
.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}
.toggle input:checked + .toggle-slider {
    background-color: var(--primary);
}
.toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

@media (max-width: 768px) {
    .setting-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .setting-input {
        width: 100%;
        justify-content: space-between;
    }
}
