/* --- Mira Dashboard v3: Minimalist & Creative --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    --bg-main: #09090b;
    --bg-card: #121216;
    --bg-card-hover: #18181c;
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-active: rgba(59, 130, 246, 0.5);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --shadow-premium: 0 20px 40px rgba(0, 0, 0, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    height: auto;
    font-size: 14px;
}

body[data-dashboard-scope="hosted"] {
    --border-active: rgba(223, 182, 103, 0.4);
    --accent-primary: #e2bf78;
    --accent-secondary: #c8913d;
    --accent-success: #e5c46d;
}

body[data-dashboard-scope="hosted"]::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 18%, rgba(236, 203, 132, 0.04), transparent 20%),
        radial-gradient(circle at 80% 24%, rgba(191, 139, 56, 0.035), transparent 18%);
    opacity: 0.24;
    animation: pro-ambient-pulse 8s ease-in-out infinite;
    z-index: 0;
}

.dash-layout {
    width: 100%;
    min-height: 100vh;
    background: var(--bg-main);
    position: relative;
    display: block;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    min-width: 240px;
    background: rgba(18, 18, 22, 0.95);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-right: 1px solid var(--border-subtle);
    padding: 2rem 1.5rem 0.75rem; /* Reduced bottom padding to move profile lower */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 100;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    /* Ensure it shows on desktop by default */
    transform: translateX(0);
}

.sidebar.active {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(0, 0, 0, 0.6);
}


body[data-dashboard-scope="hosted"] .sidebar {
    background: rgba(18, 18, 22, 0.95);
    border-right-color: rgba(223, 182, 103, 0.08);
    box-shadow: inset -1px 0 0 rgba(249, 219, 154, 0.025);
}

/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar { width: 4px; }

.dash-main {
    margin-left: 240px;
    width: calc(100% - 240px);
    min-height: 100vh;
    padding: 2.5rem 3.5rem;
    scroll-behavior: smooth;
    position: relative;
    z-index: 10;
    overflow-x: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(124, 102, 255, 0.03) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 40%);
}

.logo-v3 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2rem;
}

.logo-v3-glyph {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

body[data-dashboard-scope="hosted"] .logo-v3-glyph,
body[data-dashboard-scope="hosted"] .logo-v3-image {
    box-shadow: 0 0 0 1px rgba(245, 225, 177, 0.12), 0 0 22px rgba(226, 191, 120, 0.16), 0 0 48px rgba(200, 145, 61, 0.08);
    animation: pro-logo-glow 2.9s ease-in-out infinite;
}

.logo-v3-image {
    display: block;
    object-fit: cover;
    border-radius: 10px;
    background: #1c1f29;
}

.logo-v3-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
}

.nav-group-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

body[data-dashboard-scope="hosted"] .nav-group-label {
    color: var(--text-muted);
    text-shadow: none;
}

.v3-nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    margin-bottom: 4px;
}

.v3-nav-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.v3-nav-btn.active {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
    box-shadow: inset 0 0 0 1px var(--border-active);
}

.v3-ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.v3-ghost-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--border-active);
    transform: translateY(-1px);
}

.counting-help-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 800;
    cursor: help;
    vertical-align: middle;
}

body[data-dashboard-scope="hosted"] .v3-nav-btn:hover {
    background: rgba(226, 191, 120, 0.035);
}

body[data-dashboard-scope="hosted"] .v3-nav-btn.active {
    background: linear-gradient(90deg, rgba(226, 191, 120, 0.12), rgba(200, 145, 61, 0.08));
    box-shadow:
        inset 0 0 0 1px rgba(223, 182, 103, 0.28),
        0 0 18px rgba(226, 191, 120, 0.08);
    color: #efd59b;
}

.v3-nav-btn svg {
    width: 20px;
    height: 20px;
}

/* --- Main View --- */
.dash-main {
    margin-left: 240px;
    width: calc(100% - 240px);
    min-height: 100vh;
    padding: 2.5rem 3.5rem;
    scroll-behavior: smooth;
    position: relative;
    z-index: 10;
    overflow-x: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(124, 102, 255, 0.03) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 40%);
}

body[data-dashboard-scope="hosted"] .dash-main {
    margin-left: 240px;
    width: calc(100% - 240px);
    min-height: 100vh;
    padding: 2.5rem 3.5rem;
    scroll-behavior: smooth;
    position: relative;
    z-index: 10;
    overflow-x: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(124, 102, 255, 0.03) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 40%);
}

/* --- Tab System --- */
.v3-tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.v3-tab-pane.active {
    display: block;
}

.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.v3-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3.5rem;
}

.v3-title-wrap h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

/* --- Bento Grid --- */
/* --- Modern Module Design (Opt-in) --- */
.v3-tab-pane.bot-style-pane {
    max-width: 1200px;
    margin: 0 auto;
}

body[data-dashboard-scope="hosted"] .dashboard-scope-bar,
body[data-dashboard-scope="hosted"] .hosted-overview-surface,
body[data-dashboard-scope="hosted"] .free-claim-shell,
body[data-dashboard-scope="hosted"] .free-claim-actions,
body[data-dashboard-scope="hosted"] .welcome-bot-page,
body[data-dashboard-scope="hosted"] .bento-item,
body[data-dashboard-scope="hosted"] .module-card,
body[data-dashboard-scope="hosted"] .welcome-bot-section,
body[data-dashboard-scope="hosted"] .welcome-bot-helper-card {
    border-color: rgba(223, 182, 103, 0.11);
    box-shadow:
        0 0 0 1px rgba(249, 219, 154, 0.02),
        0 14px 34px rgba(18, 14, 8, 0.14);
}

body[data-dashboard-scope="hosted"] .dashboard-scope-pill,
body[data-dashboard-scope="hosted"] .welcome-bot-state-pill,
body[data-dashboard-scope="hosted"] .premium-badge,
body[data-dashboard-scope="hosted"] .nav-plan-badge {
    background: linear-gradient(135deg, rgba(226, 191, 120, 0.11), rgba(200, 145, 61, 0.075));
    color: #f0d89f;
    border: 1px solid rgba(223, 182, 103, 0.18);
    box-shadow: 0 0 12px rgba(226, 191, 120, 0.05);
    animation: pro-chip-pulse 3.8s ease-in-out infinite;
}

body[data-dashboard-scope="hosted"] #dashboard-scope-hosted,
body[data-dashboard-scope="hosted"] .dashboard-scope-button.active {
    background: linear-gradient(135deg, rgba(226, 191, 120, 0.09), rgba(200, 145, 61, 0.06));
    border-color: rgba(223, 182, 103, 0.18);
    box-shadow:
        inset 0 0 0 1px rgba(244, 222, 171, 0.06),
        0 0 18px rgba(226, 191, 120, 0.06);
}

body[data-dashboard-scope="hosted"] .welcome-bot-primary-btn,
body[data-dashboard-scope="hosted"] .btn-enable.active,
body[data-dashboard-scope="hosted"] .module-action-btn.primary {
    background: linear-gradient(135deg, #f0d28d, #c9973f);
    border-color: rgba(223, 182, 103, 0.22);
    color: #1c1408;
    box-shadow: 0 0 14px rgba(226, 191, 120, 0.08), 0 10px 24px rgba(22, 16, 8, 0.14);
}

body[data-dashboard-scope="hosted"] .welcome-bot-primary-btn:hover,
body[data-dashboard-scope="hosted"] .btn-enable.active:hover,
body[data-dashboard-scope="hosted"] .module-action-btn.primary:hover {
    filter: brightness(1.02);
    box-shadow: 0 0 18px rgba(226, 191, 120, 0.11), 0 14px 28px rgba(22, 16, 8, 0.16);
}

body[data-dashboard-scope="hosted"] .module-card:hover,
body[data-dashboard-scope="hosted"] .bento-item:hover,
body[data-dashboard-scope="hosted"] .welcome-bot-section:hover {
    border-color: rgba(223, 182, 103, 0.16);
    box-shadow:
        0 0 0 1px rgba(245, 226, 187, 0.03),
        0 0 20px rgba(226, 191, 120, 0.04),
        0 18px 38px rgba(18, 14, 8, 0.16);
}

body[data-dashboard-scope="hosted"] .logo-v3-text,
body[data-dashboard-scope="hosted"] .v3-title-wrap h1,
body[data-dashboard-scope="hosted"] .dashboard-scope-copy h2 {
    text-shadow: none;
}

body[data-dashboard-scope="hosted"] .item-icon-box,
body[data-dashboard-scope="hosted"] .module-card-icon,
body[data-dashboard-scope="hosted"] .dashboard-scope-button-kicker {
    filter: saturate(1.03) brightness(1.02);
}

@keyframes pro-ambient-pulse {
    0%, 100% { opacity: 0.18; transform: scale(1); }
    50% { opacity: 0.28; transform: scale(1.01); }
}

@keyframes pro-logo-glow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(245, 225, 177, 0.08), 0 0 14px rgba(226, 191, 120, 0.08), 0 0 28px rgba(200, 145, 61, 0.04); }
    50% { box-shadow: 0 0 0 1px rgba(248, 231, 193, 0.12), 0 0 18px rgba(226, 191, 120, 0.12), 0 0 36px rgba(200, 145, 61, 0.06); }
}

@keyframes pro-chip-pulse {
    0%, 100% { transform: translateY(0); box-shadow: 0 0 8px rgba(226, 191, 120, 0.04); }
    50% { transform: translateY(-1px); box-shadow: 0 0 12px rgba(226, 191, 120, 0.08); }
}

.v3-tab-pane.bot-style-pane .bento-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #171a22;
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 22px;
    padding: 28px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015), 0 24px 60px rgba(0, 0, 0, 0.18);
}

.v3-tab-pane.bot-style-pane .bento-item {
    background: #1d2028;
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 14px;
    width: 100%;
    grid-column: auto;
    grid-row: auto;
    transform: none;
    box-shadow: none;
    padding: 24px;
    min-height: 0;
}

.v3-tab-pane.bot-style-pane .item-label {
    min-height: 60px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border-bottom: none;
    margin: -24px -24px 20px -24px;
    font-size: 13px;
    font-weight: 800;
}

.module-pane .module-section-card .item-label,
.module-pane .item-label,
.welcome-module-themed .welcome-module-item-label {
    background: transparent;
    box-shadow: none;
}

/* --- Bento Grid --- */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(180px, auto);
    gap: 1.5rem;
}

.bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.bento-item:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-premium);
}

/* --- Module Workspace System --- */
.module-pane {
    --module-accent-rgb: 59, 130, 246;
    --module-accent: rgb(var(--module-accent-rgb));
    max-width: none;
    width: 100%;
}

.module-pane.theme-levels { --module-accent-rgb: 139, 92, 246; }
.module-pane.theme-gaming { --module-accent-rgb: 245, 158, 11; }
.module-pane.theme-music { --module-accent-rgb: 236, 72, 153; }
.module-pane.theme-starboard { --module-accent-rgb: 245, 158, 11; }
.module-pane.theme-giveaways { --module-accent-rgb: 99, 102, 241; }
.module-pane.theme-scheduled { --module-accent-rgb: 139, 92, 246; }
.module-pane.theme-reaction-roles { --module-accent-rgb: 236, 72, 153; }
.module-pane.theme-welcome { --module-accent-rgb: 16, 185, 129; }
.module-pane.theme-j2c { --module-accent-rgb: 34, 211, 238; }
.module-pane.theme-sticky { --module-accent-rgb: 244, 114, 182; }
.module-pane.theme-customcmds { --module-accent-rgb: 245, 158, 11; }
.module-pane.theme-tickets { --module-accent-rgb: 16, 185, 129; }
.module-pane.theme-automod { --module-accent-rgb: 239, 68, 68; }
.module-pane.theme-logging { --module-accent-rgb: 59, 130, 246; }

.module-pane-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
    color: rgba(226, 232, 240, 0.72);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.module-pane-kicker-line {
    width: 42px;
    height: 1px;
    background: linear-gradient(90deg, rgba(var(--module-accent-rgb), 0.9), rgba(var(--module-accent-rgb), 0));
}

.module-pane .module-workspace-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.module-pane .bento-item {
    padding: 1.15rem 0;
    border-radius: 0;
    margin: 0;
}

.module-pane .bento-item.wide,
.module-pane .bento-item.large,
.module-pane .module-lead-card {
    grid-column: 1 / -1;
}

.module-pane .bento-item.tall,
.module-pane .bento-item.large {
    grid-row: auto;
}

.module-pane .bento-item.large {
    min-height: auto;
}

.module-pane .bento-item.tall {
    min-height: 0;
}

.module-pane .module-panel-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: none;
    transition: border-color 160ms ease, background 160ms ease;
    overflow: visible;
}

.module-pane .module-panel-card:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.09);
    box-shadow: none;
}

.module-pane .module-panel-card::before {
    display: none;
}

.module-pane .module-lead-card {
    min-height: auto;
    display: block;
    padding-top: 0.15rem;
    padding-bottom: 1rem;
    background: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.module-pane .module-lead-card::after {
    display: none;
}

.module-pane .module-lead-card > div:first-child,
.module-pane .module-lead-footer {
    position: relative;
    z-index: 1;
}

.module-lead-footer {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.module-lead-copy {
    max-width: none;
}

.module-lead-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(248, 250, 252, 0.9);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    margin-bottom: 0.55rem;
}

.module-lead-note {
    color: rgba(203, 213, 225, 0.74);
    font-size: 12px;
    line-height: 1.45;
    max-width: 72ch;
}

.module-lead-actions {
    display: none;
}

.module-lead-hint {
    color: rgba(203, 213, 225, 0.68);
    font-size: 11px;
    text-align: right;
    max-width: 24ch;
    line-height: 1.4;
}

.module-lead-jumps {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.7rem;
}

.module-jump-btn {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(10, 12, 18, 0.4);
    color: rgba(248, 250, 252, 0.92);
    border-radius: 12px;
    padding: 8px 11px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.module-jump-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--module-accent-rgb), 0.42);
    background: rgba(var(--module-accent-rgb), 0.14);
    color: white;
}

.module-pane .module-section-card .item-label {
    margin: 0 0 0.85rem;
    padding: 0 0 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(248, 250, 252, 0.96);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: transparent;
}

.module-pane .field-group {
    gap: 8px;
    margin-bottom: 0.85rem;
}

.module-pane .field-group label {
    color: rgba(203, 213, 225, 0.68);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.35px;
}

.module-pane input[type="text"],
.module-pane input[type="number"],
.module-pane input[type="password"],
.module-pane select,
.module-pane textarea {
    min-height: 44px;
    background: #181b22;
    border-color: rgba(255, 255, 255, 0.045);
    box-shadow: none;
    border-radius: 10px;
}

.module-pane textarea {
    min-height: 88px;
    line-height: 1.5;
    resize: vertical;
}

.module-pane input:focus,
.module-pane select:focus,
.module-pane textarea:focus {
    border-color: rgba(var(--module-accent-rgb), 0.45);
    background: #141822;
    box-shadow: 0 0 0 3px rgba(var(--module-accent-rgb), 0.09);
}

.module-pane .log-switch {
    min-height: 44px;
    background: #181b22;
    border-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.module-pane .log-switch:hover {
    border-color: rgba(var(--module-accent-rgb), 0.26);
    background: rgba(255, 255, 255, 0.045);
    transform: translateY(-1px);
}

.module-pane .log-switch span {
    color: rgba(226, 232, 240, 0.82);
}

.module-pane .log-switch input[type="checkbox"]:checked {
    background: rgba(var(--module-accent-rgb), 1);
    box-shadow: 0 0 16px rgba(var(--module-accent-rgb), 0.3);
}

.module-pane input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(var(--module-accent-rgb), 0.95), rgba(255, 255, 255, 0.18));
    outline: none;
}

.module-pane input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    border: 3px solid rgba(var(--module-accent-rgb), 1);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.module-pane input[type="color"] {
    min-height: 42px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(10, 12, 18, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.module-pane .module-action-primary,
.module-pane .module-action-secondary,
.module-pane .module-action-ghost {
    width: auto;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 10px;
    font-weight: 700;
}

.module-pane .item-label-row {
    margin-bottom: 0.2rem;
}

.module-pane .item-value {
    font-size: 34px;
}

.module-pane-kicker {
    display: none;
}

.module-pane .module-lead-badge,
.module-pane .module-lead-jumps {
    display: none;
}

.module-pane .module-lead-card > div:first-child {
    margin-bottom: 0;
}

.module-pane .module-lead-card > div:first-child > div:first-child {
    gap: 12px;
}

.module-pane .module-lead-card > div:first-child > div:first-child > div:first-child {
    width: 34px;
    height: 34px;
    border-radius: 9px;
}

.module-pane .module-lead-card > div:first-child > div:first-child > div:last-child > div:first-child {
    font-size: 15px;
}

.module-pane .module-lead-card > div:first-child > div:first-child > div:last-child > div:last-child {
    font-size: 10px;
}

.module-pane .module-lead-card > div:first-child {
    justify-content: flex-start;
}

.module-pane .module-lead-card > div:first-child > div:last-child {
    display: none;
}

.module-pane .module-workspace-grid > .module-panel-card:last-child {
    border-bottom: none;
}

.module-pane .item-label svg {
    width: 15px;
    height: 15px;
    opacity: 0.9;
}

.module-pane .item-label {
    gap: 10px;
}

.module-pane .channel-select,
.module-pane .role-select {
    width: 100%;
}

.module-pane [id$='-preview-container'],
.module-pane [id*='preview-container'] {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: #111319;
}

.module-pane #cc-list,
.module-pane #shop-items-list,
.module-pane #hangman-words-list {
    background: transparent;
    border: none;
    padding: 0;
}

.module-pane #cc-list > *,
.module-pane #shop-items-list > *,
.module-pane #hangman-words-list > * {
    background: #181b22;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 10px;
    padding: 10px 12px;
}

.module-pane .v3-nav-btn[style*="width: auto"] {
    min-width: 0;
}

.module-pane hr {
    opacity: 0.06;
    margin: 0.7rem 0;
}

.module-pane [style*="margin-top: 2rem"] {
    margin-top: 1rem;
}

.module-pane [style*="margin-top: 1.5rem"] {
    margin-top: 0.9rem;
}

.module-pane [style*="padding: 2rem"] {
    padding: 1rem;
}

.module-pane [style*="gap: 2.5rem"] {
    gap: 1rem;
}

.module-pane [style*="gap: 3rem"] {
    gap: 1rem;
}

.module-pane [style*="gap: 2rem"] {
    gap: 0.9rem;
}

.module-pane [style*="grid-template-columns: 1fr 1fr"],
.module-pane [style*="grid-template-columns: 1.2fr 0.8fr"],
.module-pane [style*="grid-template-columns: 1.2fr 1fr"] {
    align-items: start;
}

@media (min-width: 1100px) {
    .module-pane [style*="grid-template-columns: 1fr 1fr"],
    .module-pane [style*="grid-template-columns: 1.2fr 0.8fr"],
    .module-pane [style*="grid-template-columns: 1.2fr 1fr"] {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 0.88fr);
    }
}

@media (max-width: 1099px) {
    .module-pane [style*="display: grid"] {
        grid-template-columns: 1fr;
    }
}

.module-pane .module-action-primary {
    background: linear-gradient(135deg, rgba(var(--module-accent-rgb), 0.96), rgba(var(--module-accent-rgb), 0.74));
    border: none;
    color: white;
    box-shadow: 0 16px 28px rgba(var(--module-accent-rgb), 0.18);
}

.module-pane .module-action-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: white;
}

.module-pane .module-action-ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

/* --- Welcome Editor Rework --- */
#welcome-pane {
    max-width: none;
    width: 100%;
}

#welcome-pane .welcome-bot-page {
    background: #0e1016;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 22px;
    padding: 28px 28px 100px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

#welcome-pane .welcome-bot-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

#welcome-pane .welcome-bot-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

#welcome-pane .welcome-bot-header p {
    margin: 0;
    max-width: 980px;
    color: #a7b0c5;
    font-size: 13px;
    line-height: 1.55;
}

#welcome-pane .welcome-bot-module-state {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    color: #eef2ff;
    font-size: 13px;
    font-weight: 700;
}

#welcome-pane .welcome-bot-state-pill {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #9dc2ff;
    font-size: 13px;
    font-weight: 800;
}

#welcome-pane .welcome-bot-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#welcome-pane .welcome-bot-compact-row,
#welcome-pane .welcome-bot-section {
    background: #10131a;
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 14px;
}

#welcome-pane .welcome-bot-compact-row {
    min-height: 70px;
    width: 100%;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.12), rgba(59, 130, 246, 0.04));
    border-color: rgba(139, 92, 246, 0.45);
}

#welcome-pane .welcome-bot-new-badge {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    color: #74f0bb;
    font-size: 12px;
    font-weight: 800;
}

#welcome-pane .welcome-bot-section {
    overflow: hidden;
}

#welcome-pane .welcome-bot-section-head {
    min-height: 74px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#welcome-pane .welcome-bot-section-head h3 {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    color: #f8fafc;
}

#welcome-pane .welcome-bot-section-body {
    padding: 0 22px 22px;
}

#welcome-pane .welcome-bot-section.is-collapsed .welcome-bot-section-body {
    display: none;
}

#welcome-pane .welcome-bot-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin-bottom: 22px;
}

#welcome-pane .welcome-bot-subcopy,
#welcome-pane .welcome-bot-helper-card,
#welcome-pane .welcome-bot-placeholder-card p,
#welcome-pane .welcome-bot-customize-head p {
    color: #98a3bb;
    font-size: 14px;
    line-height: 1.6;
}

#welcome-pane .welcome-bot-form-grid,
#welcome-pane .welcome-bot-card-grid,
#welcome-pane .welcome-bot-advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

#welcome-pane .welcome-bot-mode-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 4px;
    background: #1b1e26;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-top: 4px;
}

#welcome-pane .welcome-bot-tab {
    min-width: 138px;
    height: 48px;
    padding: 0 18px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #8d97af;
    font-size: 14px;
    font-weight: 700;
}

#welcome-pane .welcome-bot-tab.active {
    background: #353947;
    color: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

#welcome-pane .welcome-bot-textarea,
#welcome-pane .welcome-bot-page input[type="text"],
#welcome-pane .welcome-bot-page select,
#welcome-pane .welcome-bot-page input[type="color"] {
    background: #1b1d25;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    color: #eef2ff;
    box-shadow: none;
}

#welcome-pane .welcome-bot-page textarea {
    min-height: 144px;
    padding: 20px;
    font-size: 15px;
    line-height: 1.6;
}

#welcome-pane .welcome-bot-message-editor {
    width: min(520px, 100%);
    margin-top: 16px;
}

#welcome-pane .welcome-bot-page input[type="text"],
#welcome-pane .welcome-bot-page select {
    min-height: 50px;
}

#welcome-pane .welcome-bot-page input:focus,
#welcome-pane .welcome-bot-page textarea:focus,
#welcome-pane .welcome-bot-page select:focus {
    -webkit-text-fill-color: #eef2ff;
    text-shadow: none;
    border-color: rgba(59, 130, 246, 0.38);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #181b23;
}

#welcome-pane .welcome-bot-preview-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 14px;
    width: min(360px, 100%);
}

#welcome-pane .welcome-bot-inline-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eef2ff;
    font-size: 14px;
    font-weight: 700;
}

#welcome-pane .welcome-bot-inline-card-toggle {
    margin-top: 2px;
}

#welcome-pane .welcome-bot-preview-frame {
    min-height: 206px;
    padding: 14px;
    background: #1b1d25;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    overflow: hidden;
}

#welcome-pane .welcome-bot-preview-state {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

#welcome-pane .welcome-bot-preview-frame img {
    max-width: 100%;
    width: 100%;
    border-radius: 12px;
    display: none;
}

#welcome-pane .welcome-bot-preview-frame.has-image img {
    display: block;
}

#welcome-pane .welcome-bot-preview-frame.has-image .welcome-bot-preview-state {
    display: none;
}

#welcome-pane .welcome-bot-preview-frame.is-error {
    border-color: rgba(239, 68, 68, 0.28);
    background: #181a21;
}

#welcome-pane .welcome-bot-card-customize {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#welcome-pane .welcome-bot-customize-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

#welcome-pane .welcome-bot-customize-head h4 {
    margin: 0 0 8px;
    font-size: 15px;
    color: #f8fafc;
}

#welcome-pane .welcome-bot-customize-actions {
    display: flex;
    align-items: center;
    gap: 0;
}

#welcome-pane .welcome-bot-card-grid-compact {
    max-width: 760px;
    gap: 16px 18px;
}

#welcome-pane .welcome-bot-premium-range {
    width: 100%;
}

#welcome-pane .welcome-bot-color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 42px;
    align-items: center;
}

#welcome-pane .welcome-bot-color-row input[type="color"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    padding: 0;
    border-radius: 999px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    cursor: pointer;
}

#welcome-pane .welcome-bot-color-row input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

#welcome-pane .welcome-bot-color-row input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 999px;
}

#welcome-pane .welcome-bot-color-chip {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #636b82;
    opacity: 0.9;
}

#welcome-pane .welcome-bot-color-row-muted .welcome-bot-color-chip:nth-child(1) { background: #747d97; }
#welcome-pane .welcome-bot-color-row-muted .welcome-bot-color-chip:nth-child(2) { background: #9ca3af; }
#welcome-pane .welcome-bot-color-row-muted .welcome-bot-color-chip:nth-child(3) { background: #ef4444; }
#welcome-pane .welcome-bot-color-row-muted .welcome-bot-color-chip:nth-child(4) { background: #f97316; }
#welcome-pane .welcome-bot-color-row-muted .welcome-bot-color-chip:nth-child(5) { background: #facc15; }
#welcome-pane .welcome-bot-color-row-muted .welcome-bot-color-chip:nth-child(6) { background: #22c55e; }
#welcome-pane .welcome-bot-color-row-muted .welcome-bot-color-chip:nth-child(7) { background: #06b6d4; }
#welcome-pane .welcome-bot-color-row-muted .welcome-bot-color-chip:nth-child(8) { background: #3b82f6; }

#welcome-pane .welcome-bot-advanced {
    background: #1f222b;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 16px 18px;
}

#welcome-pane .welcome-bot-advanced summary {
    cursor: pointer;
    color: #dbe4ff;
    font-size: 14px;
    font-weight: 700;
}

#welcome-pane .welcome-bot-advanced-grid {
    margin-top: 18px;
}

#welcome-pane .welcome-bot-role-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
}

#welcome-pane .welcome-bot-role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    min-height: 22px;
    margin-top: 8px;
}

#welcome-pane .welcome-bot-helper-card,
#welcome-pane .welcome-bot-placeholder-card {
    margin-top: 14px;
    padding: 18px;
    background: #303440;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
}

#welcome-pane .welcome-bot-placeholder {
    display: flex;
}

#welcome-pane .welcome-bot-placeholder-card {
    max-width: 480px;
}

#welcome-pane .welcome-captcha-shell {
    max-width: 980px;
}

#welcome-pane .welcome-captcha-title {
    margin-bottom: 16px;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 700;
}

#welcome-pane .welcome-captcha-preview-wrap {
    display: block;
}

#welcome-pane .welcome-captcha-preview-card {
    width: min(420px, 100%);
}

#welcome-pane .welcome-captcha-preview-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

#welcome-pane .welcome-captcha-bot-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.14);
}

#welcome-pane .welcome-captcha-bot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#welcome-pane .welcome-captcha-bot-line {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

#welcome-pane .welcome-captcha-bot-name {
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

#welcome-pane .welcome-captcha-bot-badge {
    background: #5865f2;
    color: #fff;
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 9px;
    font-weight: 800;
}

#welcome-pane .welcome-captcha-bot-time {
    color: #8f97ae;
    font-size: 10px;
}

#welcome-pane .welcome-captcha-preview-message {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #14161d;
    border-radius: 6px;
    padding: 12px 14px 12px 16px;
    overflow: hidden;
}

#welcome-pane .welcome-captcha-preview-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    border-radius: 999px;
    background: var(--captcha-accent, #63d7ff);
}

#welcome-pane .welcome-captcha-preview-copy {
    flex: 1;
    min-width: 0;
    padding-left: 2px;
}

#welcome-pane .welcome-captcha-preview-blur {
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(1.1px);
    margin-bottom: 8px;
}

#welcome-pane .welcome-captcha-preview-blur.short { width: 110px; }
#welcome-pane .welcome-captcha-preview-blur.long { width: 220px; }
#welcome-pane .welcome-captcha-preview-blur.mid { width: 170px; }
#welcome-pane .welcome-captcha-preview-blur.tiny { width: 90px; margin-bottom: 0; }

#welcome-pane .welcome-captcha-preview-text {
    color: #e5e7eb;
    font-size: 11px;
    line-height: 1.5;
    margin-bottom: 6px;
    white-space: pre-wrap;
}

#welcome-pane .welcome-captcha-preview-text.title,
#welcome-pane .welcome-captcha-preview-text.field-name {
    color: #fff;
    font-weight: 700;
}

#welcome-pane .welcome-captcha-preview-text.field-value {
    margin-bottom: 0;
}

#welcome-pane .welcome-captcha-verify-btn {
    margin-top: 14px;
    min-height: 34px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background: #40c485;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

#welcome-pane .welcome-captcha-action-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

#welcome-pane .welcome-captcha-mode-tabs {
    margin-top: 18px;
}

#welcome-pane .welcome-captcha-advanced-btn,
#welcome-pane .welcome-captcha-link-btn {
    border: none;
    background: transparent;
    color: #dbe4ff;
    font-size: 13px;
    font-weight: 700;
    padding: 0;
}

#welcome-pane .welcome-captcha-footer {
    display: flex;
    align-items: center;
    gap: 16px;
}

#welcome-pane .welcome-captcha-text-wrap,
#welcome-pane .welcome-captcha-advanced-wrap {
    margin-top: 16px;
}

#welcome-pane .welcome-captcha-advanced-card {
    padding: 18px 20px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#welcome-pane .welcome-captcha-advanced-head h4 {
    margin: 0 0 6px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 800;
}

#welcome-pane .welcome-captcha-advanced-head p,
#welcome-pane .welcome-captcha-method-note {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
}

#welcome-pane .welcome-captcha-method-note {
    margin-top: 14px;
}

#welcome-pane .welcome-captcha-builder-wrap {
    margin-top: 14px;
}

#welcome-pane .embed-builder-shell {
    padding: 10px 0 4px;
    width: 100%;
}

#welcome-pane .embed-builder-toolbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

#welcome-pane .embed-builder-toolbar-pill {
    min-height: 32px;
    padding: 0 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    background: #353947;
    color: #eef2ff;
    font-size: 13px;
    font-weight: 800;
}

#welcome-pane .embed-builder-toolbar-label {
    color: #8f97ae;
    font-size: 13px;
    line-height: 1;
}

#welcome-pane .embed-builder-color-strip {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

#welcome-pane .embed-builder-color-strip .custom-color-trigger {
    position: relative; 
    width: 24px; 
    height: 24px; 
    border-radius: 50%; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red); 
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
#welcome-pane .embed-builder-color-strip .custom-color-trigger:hover {
    transform: scale(1.1);
}

#welcome-pane .embed-builder-color-strip button {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

#welcome-pane .embed-builder-color-strip button {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
}

#welcome-pane .embed-builder-color-strip button.active {
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    color: #fff;
}

#welcome-pane .embed-builder-color-strip button.active::after {
    content: '\2713';
    font-size: 10px;
    font-weight: 900;
}

#welcome-pane .embed-builder-preview-btn {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: #353947;
    color: #eef2ff;
    font-size: 13px;
    font-weight: 800;
}

#welcome-pane .embed-builder-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    width: 100%;
    position: relative;
    padding-left: 16px;
}

@media (max-width: 1100px) {
    #welcome-pane .embed-builder-layout {
        grid-template-columns: 1fr;
    }
}

#welcome-pane .embed-builder-layout::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 999px;
    background: var(--embed-theme-color, #63d7ff);
    transition: background 0.2s ease;
}

#welcome-pane .embed-builder-fields {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: none;
}

#welcome-pane .embed-builder-field-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

#welcome-pane .embed-builder-avatar-chip {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #949ba4;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.embed-preview-empty-state {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    color: #9aa3b9;
    font-size: 13px;
    font-style: italic;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.embed-builder-preview-col {
    position: sticky;
    top: 20px;
    height: fit-content;
}

#welcome-pane .embed-builder-split-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 28px;
    align-items: start;
    width: 100%;
}

#welcome-pane .embed-builder-upload-tile,
#welcome-pane .embed-builder-image-block-tile {
    position: relative;
    overflow: hidden;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 12px;
    background: rgba(27, 29, 37, 0.55);
}

#welcome-pane .embed-builder-upload-trigger {
    cursor: pointer;
}

#welcome-pane .embed-builder-upload-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 18px);
    top: 50%;
    transform: translateY(-50%);
    background: #14161d;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease, visibility 120ms ease;
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
}

#welcome-pane .embed-builder-upload-trigger::before {
    content: "";
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    border-width: 7px;
    border-style: solid;
    border-color: transparent #14161d transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease, visibility 120ms ease;
    z-index: 20;
}

#welcome-pane .embed-builder-upload-trigger:hover::after,
#welcome-pane .embed-builder-upload-trigger:hover::before {
    opacity: 1;
    visibility: visible;
}

#welcome-pane .embed-builder-upload-tile {
    width: 110px;
    height: 110px;
}

#welcome-pane .embed-builder-image-block-tile {
    width: 138px;
    height: 138px;
}

#welcome-pane .embed-builder-upload-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a2abc1;
    font-size: 26px;
    pointer-events: none;
}

#welcome-pane .embed-builder-upload-trigger.has-file {
    border-style: solid;
    border-color: rgba(96, 165, 250, 0.55);
}

#welcome-pane .embed-builder-upload-trigger.has-file .embed-builder-upload-icon {
    color: #60a5fa;
}

#welcome-pane .embed-builder-upload-tile input,
#welcome-pane .embed-builder-image-block-tile input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

#welcome-pane .embed-builder-field-stack {
    display: grid;
    gap: 12px;
    width: 100%;
}

#welcome-pane .embed-builder-image-block {
    margin-top: 4px;
    width: 100%;
}

#welcome-pane .embed-builder-footer-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
}

#welcome-pane .embed-builder-textarea {
    min-height: 106px;
}

#welcome-pane .embed-builder-fields .field-group,
#welcome-pane .embed-builder-fields input[type="text"],
#welcome-pane .embed-builder-fields textarea {
    width: 100%;
}

#welcome-pane .embed-builder-image-block-tile {
    justify-self: start;
}

.bot-style-pane .embed-builder-shell {
    padding: 10px 0 4px;
    width: 100%;
}

.bot-style-pane .embed-builder-toolbar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
}

.bot-style-pane .embed-builder-toolbar-pill {
    min-height: 32px;
    padding: 0 14px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    background: #353947;
    color: #eef2ff;
    font-size: 13px;
    font-weight: 800;
}

.bot-style-pane .embed-builder-toolbar-label {
    color: #8f97ae;
    font-size: 13px;
    line-height: 1;
}

.bot-style-pane .embed-builder-color-strip {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bot-style-pane .embed-builder-color-strip .custom-color-trigger {
    position: relative;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: conic-gradient(red, yellow, lime, aqua, blue, magenta, red);
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.bot-style-pane .embed-builder-color-strip .custom-color-trigger:hover {
    transform: scale(1.1);
}

.bot-style-pane .embed-builder-color-strip .custom-color-trigger.active {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.88), 0 0 0 5px rgba(96, 165, 250, 0.22);
}

.bot-style-pane .embed-builder-color-strip button {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
}

.bot-style-pane .embed-builder-color-strip button.active {
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
    color: #fff;
}

.bot-style-pane .embed-builder-color-strip button.active::after {
    content: '\2713';
    font-size: 10px;
    font-weight: 900;
}

.bot-style-pane .embed-builder-preview-btn {
    min-height: 34px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    background: #353947;
    color: #eef2ff;
    font-size: 13px;
    font-weight: 800;
}

.bot-style-pane .embed-builder-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    width: 100%;
    position: relative;
    padding-left: 16px;
}

@media (max-width: 1100px) {
    .bot-style-pane .embed-builder-layout {
        grid-template-columns: 1fr;
    }
}

.bot-style-pane .embed-builder-layout::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 999px;
    background: var(--embed-theme-color, #63d7ff);
    transition: background 0.2s ease;
}

.bot-style-pane .embed-builder-fields {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: none;
}

.bot-style-pane .embed-builder-field-row,
.bot-style-pane .embed-builder-footer-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    width: 100%;
}

.bot-style-pane .embed-builder-avatar-chip {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: #949ba4;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bot-style-pane .embed-builder-split-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 28px;
    align-items: start;
    width: 100%;
}

.bot-style-pane .embed-builder-upload-tile,
.bot-style-pane .embed-builder-image-block-tile {
    position: relative;
    overflow: hidden;
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 12px;
    background: rgba(27, 29, 37, 0.55);
}

.bot-style-pane .embed-builder-upload-trigger {
    cursor: pointer;
}

.bot-style-pane .embed-builder-upload-trigger::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 18px);
    top: 50%;
    transform: translateY(-50%);
    background: #14161d;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 10px 14px;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease, visibility 120ms ease;
    white-space: nowrap;
    pointer-events: none;
    z-index: 20;
}

.bot-style-pane .embed-builder-upload-trigger::before {
    content: "";
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    border-width: 7px;
    border-style: solid;
    border-color: transparent #14161d transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: opacity 120ms ease, visibility 120ms ease;
    z-index: 20;
}

.bot-style-pane .embed-builder-upload-trigger:hover::after,
.bot-style-pane .embed-builder-upload-trigger:hover::before {
    opacity: 1;
    visibility: visible;
}

.bot-style-pane .embed-builder-upload-tile {
    width: 110px;
    height: 110px;
}

.bot-style-pane .embed-builder-image-block-tile {
    width: 138px;
    height: 138px;
    justify-self: start;
}

.bot-style-pane .embed-builder-upload-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a2abc1;
    font-size: 26px;
    pointer-events: none;
}

.bot-style-pane .embed-builder-upload-trigger.has-file {
    border-style: solid;
    border-color: rgba(96, 165, 250, 0.55);
}

.bot-style-pane .embed-builder-upload-trigger.has-file .embed-builder-upload-icon {
    color: #60a5fa;
}

.bot-style-pane .embed-builder-upload-tile input,
.bot-style-pane .embed-builder-image-block-tile input {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.bot-style-pane .embed-builder-field-stack {
    display: grid;
    gap: 12px;
    width: 100%;
}

.bot-style-pane .embed-builder-image-block {
    margin-top: 4px;
    width: 100%;
}

.bot-style-pane .embed-builder-textarea {
    min-height: 106px;
}

.bot-style-pane .embed-builder-fields .field-group,
.bot-style-pane .embed-builder-fields input[type="text"],
.bot-style-pane .embed-builder-fields textarea {
    width: 100%;
}

.embed-preview-modal {
    z-index: 10020;
}

.embed-preview-dialog {
    width: 100%;
    max-width: 760px;
    background: #232630;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.45);
}

.embed-preview-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.embed-preview-dialog-head h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 16px;
    font-weight: 800;
}

.embed-preview-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #cbd5e1;
    font-size: 24px;
    line-height: 1;
    transition: background 120ms ease, color 120ms ease;
}

.embed-preview-close:hover {
    background: rgba(239, 68, 68, 0.16);
    color: #f87171;
}

.embed-preview-dialog-body {
    margin-top: 16px;
    padding: 18px;
    background: #2a2e38;
    border-radius: 12px;
}

.embed-preview-discord-shell {
    display: flex;
    gap: 12px;
}

.embed-preview-bot-avatar {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #67d6ff;
    color: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
}

.embed-preview-discord-copy {
    flex: 1;
    min-width: 0;
}

.embed-preview-discord-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.embed-preview-discord-name {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
}

.embed-preview-discord-badge {
    background: #5865f2;
    color: #fff;
    border-radius: 4px;
    padding: 1px 4px;
    font-size: 10px;
    font-weight: 800;
}

.embed-preview-discord-time {
    color: #9aa3b9;
    font-size: 12px;
}

.embed-preview-card-live {
    position: relative;
    background: #2f333b;
    border-radius: 8px;
    padding: 12px 12px 10px 16px;
}

.embed-preview-card-accent {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 999px;
    background: #63d7ff;
}

.embed-preview-card-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 16px;
    align-items: start;
}

.embed-preview-card-copy {
    flex: 1;
    min-width: 0;
}

.embed-preview-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.embed-preview-card-author img,
.embed-preview-card-footer img {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    object-fit: cover;
}

.embed-preview-card-title {
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 4px;
}

.embed-preview-card-description,
.embed-preview-card-field-value {
    color: #f1f5f9;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.embed-preview-card-field {
    margin-top: 10px;
}

.embed-preview-card-field-name {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 3px;
}

.embed-preview-card-thumb-wrap {
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    justify-self: end;
}

.embed-preview-card-thumb-wrap img,
.embed-preview-card-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.embed-preview-card-image-wrap {
    margin-top: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.embed-preview-card-footer {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #b6becf;
    font-size: 12px;
}



#welcome-pane .welcome-bot-placeholder-title {
    margin-bottom: 8px;
    color: #f8fafc;
    font-size: 15px;
    font-weight: 800;
}

#welcome-pane .welcome-bot-primary-btn,
#welcome-pane .welcome-bot-secondary-btn {
    min-height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 800;
}

#welcome-pane .welcome-bot-primary-btn {
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
}

#welcome-pane .welcome-bot-secondary-btn {
    background: #343845;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

#welcome-pane .welcome-bot-secondary-btn:hover {
    background: #404658;
    border-color: rgba(255, 255, 255, 0.12);
}

#welcome-pane .welcome-bot-secondary-btn.is-working {
    background: #43506a;
    border-color: rgba(96, 165, 250, 0.3);
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.15) inset;
}

#welcome-pane .welcome-bot-switch,
#welcome-pane .welcome-bot-inline-switch {
    position: relative;
}

#welcome-pane .welcome-bot-switch input,
#welcome-pane .welcome-bot-inline-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

#welcome-pane .welcome-bot-slider {
    width: 56px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    background: #7f86a2;
    transition: background 160ms ease;
}

#welcome-pane .welcome-bot-slider::after {
    content: "";
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #eef2ff;
    box-shadow: 0 2px 8px rgba(10, 13, 18, 0.28);
    transition: transform 160ms ease;
}

#welcome-pane .welcome-bot-switch input:checked + .welcome-bot-slider,
#welcome-pane .welcome-bot-inline-switch input:checked + .welcome-bot-slider {
    background: #3b82f6;
}

#welcome-pane .welcome-bot-switch input:checked + .welcome-bot-slider::after,
#welcome-pane .welcome-bot-inline-switch input:checked + .welcome-bot-slider::after {
    transform: translateX(26px);
}

#welcome-pane .welcome-required {
    color: #fb7185;
}

#welcome-pane .welcome-bot-footer {
    position: sticky;
    bottom: 0;
    margin-top: 18px;
    margin-left: -28px;
    margin-right: -28px;
    margin-bottom: -100px;
    padding: 18px 28px;
    background: rgba(24, 26, 34, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    backdrop-filter: blur(14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(16px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

#welcome-pane .welcome-bot-footer.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

#welcome-pane .welcome-bot-footer-note {
    color: #eef2ff;
    font-size: 12px;
    font-weight: 700;
}

#welcome-pane .welcome-bot-footer-actions {
    display: flex;
    gap: 12px;
}

@media (max-width: 980px) {
    #welcome-pane .welcome-bot-header,
    #welcome-pane .welcome-bot-customize-head,
    #welcome-pane .welcome-bot-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    #welcome-pane .welcome-bot-form-grid,
    #welcome-pane .welcome-bot-card-grid,
    #welcome-pane .welcome-bot-advanced-grid,
    #welcome-pane .welcome-bot-role-picker-row {
        grid-template-columns: 1fr;
    }
}

/* --- Module Gallery --- */
.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    align-items: start;
}

.module-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-height: 208px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    align-self: start;
}

.module-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top left, var(--accent-primary), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.module-card:hover::before {
    opacity: 0.05;
}

.module-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 1;
}

.module-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-primary);
    transition: all 0.3s ease;
}

.module-card:hover .module-card-icon {
    background: var(--accent-primary);
    color: white;
    transform: rotate(-5deg) scale(1.1);
}

.module-status {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.module-status.enabled {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.module-status.disabled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.enabled .status-dot {
    background: var(--accent-success);
    box-shadow: 0 0 10px var(--accent-success);
    animation: status-pulse 2s infinite;
}

@keyframes status-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
    100% { transform: scale(1); opacity: 1; }
}

.module-card-body {
    z-index: 1;
}

.module-card-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}

.module-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.module-card-footer {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    z-index: 1;
}

.btn-manage {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.module-card:hover .btn-manage {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* --- Premium Module Styles --- */
.premium-badge {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(245, 158, 11, 0.2);
    align-self: flex-start;
}

.premium-badge svg {
    width: 12px;
    height: 12px;
}

.btn-enable {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.03);
    color: white;
    font-weight: 600;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-enable.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.btn-enable:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.btn-enable.active:hover {
    background: #2563eb;
}

.module-compact-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
}

.module-compact-header h2 {
    font-size: 24px;
    font-weight: 800;
    font-family: var(--font-heading);
}

#modules-pane .bento-grid {
    grid-auto-rows: minmax(140px, auto); /* Tighter grid for gallery */
}

.bento-item.large { 
    grid-column: span 2; 
    grid-row: span 2; 
    min-height: 400px;
}
.bento-item.wide { grid-column: span 2; }
.bento-item.tall { grid-row: span 2; }

/* --- Stats & Labels --- */
.item-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
}

.item-value {
    font-family: var(--font-heading);
    font-size: 42px;
    font-weight: 800;
    color: white;
}

.item-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--bg-card-hover);
    display: flex;
    align-items: center;
    justify-content: center;
}

.v3-tab-pane {
    display: none;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.v3-tab-pane.active {
    display: block;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Glassmorphism overlays */
.glass-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.08), transparent);
    pointer-events: none;
    z-index: 0;
}

/* Injected Component Styles */
.command-grid, .v3-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.command-card, .item-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 1.25rem;
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.command-card:hover, .item-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.command-info .command-name {
    font-weight: 700;
    font-size: 15px;
    color: white;
    margin-bottom: 4px;
}

.command-info .command-desc {
    font-size: 12px;
    color: var(--text-muted);
}

/* Switches (Neon style for Mira v3) */
.neon-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.neon-switch input { opacity: 0; width: 0; height: 0; }

.n-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(255,255,255,0.1);
    transition: .4s;
    border-radius: 34px;
}

.n-slider:before {
    position: absolute;
    content: "";
    height: 18px; width: 18px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .n-slider {
    background-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary);
}

input:checked + .n-slider:before {
    transform: translateX(20px);
}

/* --- Premium Form Inputs --- */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 2rem;
}

.field-group label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

input[type="text"], 
input[type="number"], 
input[type="password"],
select, 
textarea {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    color: white;
    font-family: var(--font-body);
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 5 3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 45px;
}

input:focus, 
select:focus, 
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.channel-select {
    width: 100%;
}

.v3-nav-btn {
    /* Ensure cursor pointer for interactive elements */
    cursor: pointer;
}

/* Scrollbar Polishing */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
/* --- Audit Logs & Switches --- */
.switch-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.log-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.log-switch:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-2px);
}

.log-switch span {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.log-switch:hover span {
    color: var(--text-primary);
}

/* Custom Checkbox as Toggle */
.log-switch input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 38px;
    height: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    cursor: pointer;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.log-switch input[type="checkbox"]:checked {
    background: var(--accent-primary);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.4);
}

.log-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.log-switch input[type="checkbox"]:checked::before {
    left: 21px;
}

@media (max-width: 1200px) {
    .switch-group {
        grid-template-columns: repeat(2, 1fr);
    }

    .module-lead-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .module-lead-actions {
        align-items: flex-start;
        width: 100%;
    }

    .module-lead-hint {
        text-align: left;
        max-width: none;
    }

    .module-lead-jumps {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .switch-group {
        grid-template-columns: 1fr;
    }

    .module-pane-kicker {
        flex-wrap: wrap;
    }

    .module-pane .bento-grid {
        grid-template-columns: 1fr;
    }

    .module-pane .bento-item,
    .module-pane .bento-item.wide,
    .module-pane .bento-item.large,
    .module-pane .bento-item.tall {
        grid-column: span 1;
        grid-row: auto;
        min-height: auto;
    }

    .module-lead-footer {
        gap: 1rem;
    }

    .module-jump-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --- Categorized Module Gallery --- */
.module-category-nav {
    display: flex;
    gap: 12px;
    margin: 2rem 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
    scrollbar-width: none;
}

.module-category-nav::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    padding: 10px 20px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.cat-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    transform: translateY(-2px);
}

.cat-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.module-section {
    margin-bottom: 3.5rem;
    animation: fadeIn 0.5s ease forwards;
}

.module-section-header {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-section-header::after {
    content: '';
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, var(--border-subtle), transparent);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Welcome Setup Wizard & Command Manager --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 2rem;
    animation: modal-bg-fade 0.5s ease forwards;
}

@keyframes modal-bg-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    width: 100%;
    max-width: 680px;
    max-height: min(86vh, 920px);
    background: rgba(18, 18, 22, 0.8);
    border: 1px solid var(--border-subtle);
    border-radius: 32px;
    padding: 3rem;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8),
                0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: modal-entry 0.6s cubic-bezier(0.19, 1, 0.22, 1) forwards;
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, 0.35) transparent;
}

.modal {
    overflow-y: auto;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.28);
    border-radius: 999px;
}

@keyframes modal-entry {
    from { transform: scale(0.9) translateY(40px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.glass-morphism {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--border-subtle);
}

.setup-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    color: var(--text-muted);
    transition: all 0.4s ease;
}

.step.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    transform: scale(1.1);
}

.step-line {
    height: 2px;
    width: 60px;
    background: var(--border-subtle);
    border-radius: 1px;
}

.setup-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.9rem;
}

.setup-module-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.85fr);
    gap: 1.25rem;
    margin-bottom: 2rem;
    align-items: stretch;
}

.setup-module-hero-copy h2 {
    margin: 0 0 0.75rem;
    font-size: 32px;
    line-height: 1.02;
    letter-spacing: -0.04em;
    font-weight: 900;
}

.setup-module-hero-copy p {
    margin: 0;
    color: var(--text-secondary);
    max-width: 650px;
    font-size: 15px;
    line-height: 1.7;
}

.setup-module-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.9rem;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.26);
    background: rgba(59, 130, 246, 0.08);
    color: #8ab4ff;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.setup-module-hero-note {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 1.25rem 1.35rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.14), transparent 48%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.setup-module-hero-note strong {
    color: white;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.setup-module-hero-note span {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.65;
}

.setup-module-mini {
    --setup-accent: #3b82f6;
    background: linear-gradient(180deg, rgba(11, 16, 28, 0.96), rgba(9, 13, 24, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    padding: 1rem 1rem;
    min-height: 118px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    animation: setup-module-card-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--stagger, 0) * 42ms);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}

.setup-module-mini::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, color-mix(in srgb, var(--setup-accent) 8%, transparent), transparent 48%);
    opacity: 0.5;
    pointer-events: none;
}

.setup-module-mini::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.02);
    transition: background 0.28s ease, box-shadow 0.28s ease;
}

.setup-module-mini .mini-icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: color-mix(in srgb, var(--setup-accent) 86%, white);
    background: color-mix(in srgb, var(--setup-accent) 12%, rgba(15, 23, 42, 0.78));
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--setup-accent) 24%, rgba(255, 255, 255, 0.04));
    transition: transform 0.28s ease, background 0.28s ease, box-shadow 0.28s ease;
}

.setup-module-mini .mini-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
}

.setup-module-mini .mini-copy strong {
    color: white;
    font-size: 14px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.setup-module-mini .mini-copy small {
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.setup-module-mini:hover {
    transform: translateY(-3px);
    border-color: color-mix(in srgb, var(--setup-accent) 42%, rgba(255, 255, 255, 0.08));
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.setup-module-mini:hover .mini-icon {
    transform: translateY(-1px) scale(1.02);
}

.setup-module-mini.active {
    border-color: color-mix(in srgb, var(--setup-accent) 58%, rgba(255, 255, 255, 0.12));
    box-shadow:
        0 16px 34px rgba(0, 0, 0, 0.24),
        inset 0 0 0 1px color-mix(in srgb, var(--setup-accent) 16%, transparent);
}

.setup-module-mini.active::after {
    background: var(--setup-accent);
    box-shadow:
        0 0 0 6px color-mix(in srgb, var(--setup-accent) 20%, transparent),
        0 0 28px color-mix(in srgb, var(--setup-accent) 28%, transparent);
}

.setup-module-mini.active .mini-icon {
    transform: scale(1.02);
    background: color-mix(in srgb, var(--setup-accent) 18%, rgba(15, 23, 42, 0.78));
    box-shadow:
        inset 0 0 0 1px color-mix(in srgb, var(--setup-accent) 30%, rgba(255, 255, 255, 0.05));
}

.setup-module-mini.active .mini-copy small {
    color: #c7d2e3;
}

@keyframes setup-module-card-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 980px) {
    .setup-module-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .modal {
        align-items: flex-start;
        padding: 1rem;
    }
    .modal-content {
        max-height: 92vh;
        padding: 1.5rem;
        border-radius: 24px;
    }
    .setup-module-grid {
        grid-template-columns: 1fr;
    }
    .modal-footer {
        position: sticky;
        bottom: 0;
        background: linear-gradient(180deg, rgba(11, 15, 26, 0), rgba(11, 15, 26, 0.98) 28%);
        padding-bottom: 0.25rem;
    }
}

.success-check {
    width: 80px;
    height: 80px;
    background: var(--accent-success);
    border-radius: 50%;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
    animation: success-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes success-pop {
    from { transform: scale(0); rotate: -90deg; }
    to { transform: scale(1); rotate: 0; }
}

.success-check svg {
    width: 40px;
    height: 40px;
}

.modal-footer {
    display: flex;
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

@keyframes pulse-border {
    0% { border-color: rgba(59, 130, 246, 0.2); }
    50% { border-color: rgba(59, 130, 246, 0.6); box-shadow: 0 0 20px rgba(59, 130, 246, 0.1); }
    100% { border-color: rgba(59, 130, 246, 0.2); }
}

/* --- Command Management Enhancement --- */
.command-card-v2 {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    transition: all 0.3s ease;
}

.command-card-v2:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-premium);
}

.command-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.command-card-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.command-card-label h4 {
    font-weight: 700;
    font-size: 16px;
    color: white;
}

.command-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

.command-card-actions {
    display: flex;
    gap: 10px;
}

.btn-mini-action {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-mini-action:hover {
    background: var(--bg-card-hover);
    color: white;
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-mini-action svg {
    width: 14px;
    height: 14px;
}

/* Switches for Command Manager */
.switch-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--text-muted);
}

.status-dot-v2 {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #4b5563; /* grey when off */
}

input:checked + .switch-indicator .status-dot-v2 {
    background: var(--accent-success);
    box-shadow: 0 0 10px var(--accent-success);
}

input:checked + .switch-indicator {
    color: var(--accent-success);
}

/* --- Command Manager Navigation --- */
.module-category-nav {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.module-category-nav::-webkit-scrollbar {
    display: none;
}

/* --- Progress Bars for Stats --- */
.progress-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.prog-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.prog-track {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 100px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.prog-fill {
    height: 100%;
    border-radius: 100px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.prog-fill.purple {
    background: linear-gradient(90deg, #8B5CF6, #D946EF);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
}

.prog-fill.cyan {
    background: linear-gradient(90deg, #06B6D4, #3B82F6);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.prog-fill.green {
    background: linear-gradient(90deg, #10B981, #34D399);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.prog-fill.orange {
    background: linear-gradient(90deg, #F59E0B, #FB923C);
    box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
}

/* --- Bento Range Select --- */
.item-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.bento-range-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: auto;
    min-width: 90px;
    appearance: none;
    text-align: center;
}

.bento-range-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.bento-range-select option {
    background: #0f172a;
    color: white;
}

/* --- Navigation & Tabs --- */
.module-category-nav .cat-btn {
    padding: 10px 22px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-secondary);
}

.module-category-nav .cat-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    transform: translateY(-2px);
}

.module-category-nav .cat-btn.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.25);
}

.command-manager-group {
    margin-bottom: 3.5rem;
    animation: fadeIn 0.5s ease-out forwards;
}

.command-manager-group:last-child {
    margin-bottom: 0;
}

/* --- Guild Selector Overlay --- */
#guild-selector {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(18, 18, 22, 0.98), #09090b);
    z-index: 9999;
    display: none; /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 6rem 2rem;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.selector-header {
    text-align: center;
    margin-bottom: 3.25rem;
    width: 100%;
    max-width: 600px;
    animation: fadeIn 0.8s ease-out;
}

.selector-header h1.logo-v3-text {
    background: linear-gradient(135deg, #fff 40%, var(--accent-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    font-size: 72px;
    letter-spacing: -5px;
    margin-bottom: 0.5rem;
    line-height: 1;
    font-family: var(--font-heading);
}

.selector-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    max-width: 1240px;
    padding: 1rem;
    perspective: 1200px;
}

.guild-card {
    background: rgba(18, 18, 22, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-subtle);
    border-radius: 36px;
    padding: 2.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    cursor: pointer;
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    text-align: center;
    overflow: hidden;
    width: 260px;
    min-height: 270px;
}

.guild-card:hover {
    background: rgba(30, 30, 36, 0.6);
    border-color: var(--accent-primary);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 28px 60px rgba(0, 0, 0, 0.6), 
                0 0 0 1px rgba(59, 130, 246, 0.5);
}

.guild-icon-wrapper {
    width: 88px;
    height: 88px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.guild-icon-wrapper img,
.icon-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 24px;
}

.icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--accent-primary);
    text-shadow: 0 0 40px rgba(59, 130, 246, 0.5);
}

.guild-card h3 {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 800;
    color: white;
    margin: 0;
    letter-spacing: -0.6px;
    z-index: 2;
    line-height: 1.15;
}

.guild-card p {
    margin: 0;
    font-weight: 900;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    transition: all 0.4s ease;
    z-index: 2;
}

.guild-card:hover p {
    opacity: 1;
    color: var(--accent-primary);
    letter-spacing: 2.5px;
}

@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 4px 20px rgba(239, 68, 68, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4); }
}

.module-status-beta {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  color: #8ec5ff;
  border: 1px solid rgba(96, 165, 250, 0.2);
  font-size: 11px;
  font-weight: 800;
}

#achievements-pane {
  max-width: none;
}

#achievements-pane .achievements-page {
  background: #171a22;
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 22px;
  padding: 14px 16px 24px;
}

#achievements-pane .achievements-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

#achievements-pane .achievements-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

#achievements-pane .achievements-title-row h2 {
  margin: 0;
  font-size: 18px;
  color: #fff;
  font-weight: 800;
}

#achievements-pane .achievements-header p {
  margin: 0;
  color: #9aa3b9;
  font-size: 13px;
}

#achievements-pane .achievements-active-indicator {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

#achievements-pane .achievements-top-switch {
  pointer-events: none;
}

#achievements-pane .achievements-tabs {
  display: flex;
  gap: 22px;
  padding: 18px 0 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

#achievements-pane .achievements-tab {
  padding: 0;
  border: none;
  background: transparent;
  color: #7f88a3;
  font-size: 13px;
  font-weight: 700;
  cursor: default;
}

#achievements-pane .achievements-tab.active {
  color: #fff;
  position: relative;
}

#achievements-pane .achievements-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -15px;
  height: 2px;
  background: rgba(255,255,255,0.92);
}

#achievements-pane .achievements-creation-row {
  display: flex;
  gap: 18px;
  padding: 22px 0 26px;
}

#achievements-pane .achievement-create-card {
  width: 240px;
  min-height: 145px;
  border-radius: 10px;
  border: 1px dashed rgba(255,255,255,0.1);
  background: #1a1d25;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
}

#achievements-pane .achievement-create-card strong {
  font-size: 14px;
  font-weight: 800;
}

#achievements-pane .achievement-create-card span:last-child {
  max-width: 170px;
  text-align: center;
  color: #76819d;
  font-size: 12px;
  line-height: 1.45;
}

#achievements-pane .achievement-create-icon-single {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(180deg, #34394a, #252a36);
  border: 1px solid rgba(153, 168, 201, 0.24);
  box-shadow: inset 0 0 0 2px rgba(92, 103, 132, 0.18);
}

#achievements-pane .achievement-tier-stack {
  display: inline-flex;
  align-items: center;
}

#achievements-pane .achievement-tier-stack span {
  width: 30px;
  height: 34px;
  margin-left: -6px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,0.5);
  box-shadow: 0 0 16px rgba(97, 212, 255, 0.18);
}

#achievements-pane .achievement-tier-stack span:nth-child(1) { margin-left: 0; background: linear-gradient(180deg,#f8c68d,#cf7d58); }
#achievements-pane .achievement-tier-stack span:nth-child(2) { background: linear-gradient(180deg,#f6f7fa,#c8d0db); }
#achievements-pane .achievement-tier-stack span:nth-child(3) { background: linear-gradient(180deg,#9bf0ff,#5ed4f0); }

#achievements-pane .achievements-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

#achievements-pane .achievements-section-label {
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

#achievements-pane .achievements-search {
  width: 240px;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: #1b1e26;
  border: 1px solid rgba(255,255,255,0.04);
  padding: 0 12px;
  color: #7d87a4;
}

#achievements-pane .achievements-search svg {
  width: 14px;
  height: 14px;
}

#achievements-pane .achievements-search input {
  width: 100%;
  min-height: 34px;
  background: transparent;
  border: none;
  color: #cbd5e1;
  font-size: 13px;
}

#achievements-pane .achievements-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

#achievements-pane .achievement-card {
  min-height: 202px;
  padding: 16px 16px 14px;
  border-radius: 10px;
  background: #1a1d25;
  border: 1px solid rgba(255,255,255,0.035);
  display: flex;
  flex-direction: column;
}

#achievements-pane .achievement-card-locked {
  border-color: rgba(251, 191, 36, 0.65);
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.08);
}

#achievements-pane .achievement-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}

#achievements-pane .achievement-badge {
  width: 88px;
  height: 42px;
  border-radius: 12px;
  position: relative;
}

#achievements-pane .achievement-badge::before,
#achievements-pane .achievement-badge::after {
  content: "";
  position: absolute;
  width: 26px;
  height: 30px;
  top: 6px;
  border-radius: 9px;
  border: 2px solid rgba(255,255,255,0.45);
}

#achievements-pane .achievement-badge::before { left: 0; background: linear-gradient(180deg,#f2c08a,#ce7a54); }
#achievements-pane .achievement-badge::after { left: 18px; background: linear-gradient(180deg,#f4f6fb,#c8cfdb); }
#achievements-pane .achievement-badge-tiered { background: linear-gradient(180deg,#9bf2ff,#5dd5f1); border: 2px solid rgba(255,255,255,0.45); }
#achievements-pane .achievement-badge-tiered.reaction { filter: hue-rotate(35deg); }
#achievements-pane .achievement-badge-tiered.voice { filter: hue-rotate(70deg); }
#achievements-pane .achievement-badge-tiered.thread { filter: hue-rotate(110deg); }
#achievements-pane .achievement-badge-tiered.chat { filter: hue-rotate(20deg) saturate(0.9); }
#achievements-pane .achievement-badge-single { width: 42px; background: linear-gradient(180deg,#9bf2ff,#5dd5f1); border: 2px solid rgba(255,255,255,0.45); }
#achievements-pane .achievement-badge-locked { width: 42px; background: linear-gradient(180deg,#323746,#1d2230); border: 2px solid rgba(120,127,150,0.35); }
#achievements-pane .achievement-badge-single::before,
#achievements-pane .achievement-badge-single::after,
#achievements-pane .achievement-badge-locked::before,
#achievements-pane .achievement-badge-locked::after { display: none; }

#achievements-pane .achievement-mini-switch {
  position: relative;
  display: inline-flex;
}

#achievements-pane .achievement-mini-switch input {
  position: absolute;
  opacity: 0;
}

#achievements-pane .achievement-mini-switch span {
  width: 24px;
  height: 14px;
  border-radius: 999px;
  background: #7d86a3;
  padding: 2px;
  display: inline-flex;
  align-items: center;
}

#achievements-pane .achievement-mini-switch span::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #eef2ff;
  transform: translateX(0);
}

#achievements-pane .achievement-mini-switch input:checked + span {
  background: #4d9cff;
}

#achievements-pane .achievement-mini-switch input:checked + span::after {
  transform: translateX(10px);
}

#achievements-pane .achievement-card h3 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

#achievements-pane .achievement-card p {
  margin: 0 0 12px;
  color: #8993ae;
  font-size: 12px;
}

#achievements-pane .achievement-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 3px;
}

#achievements-pane .achievement-card li,
#achievements-pane .achievement-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #7f88a3;
}

#achievements-pane .achievement-progress-meta {
  margin-top: auto;
  margin-bottom: 6px;
}

#achievements-pane .achievement-progress {
  height: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

#achievements-pane .achievement-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: #5eaaff;
}

#achievements-pane .achievement-link-btn {
  margin-top: auto;
  min-height: 32px;
  border: none;
  border-radius: 6px;
  background: rgba(110, 90, 52, 0.5);
  color: #f5c154;
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 1300px) {
  #achievements-pane .achievements-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
  #achievements-pane .achievements-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #achievements-pane .achievements-creation-row,
  #achievements-pane .achievements-toolbar,
  #achievements-pane .achievements-header { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 680px) {
  #achievements-pane .achievements-grid { grid-template-columns: 1fr; }
  #achievements-pane .achievement-create-card,
  #achievements-pane .achievements-search { width: 100%; }
}
/* Welcome channel select hardening for Fluxer */
#welcome-pane #welcome-channel,
#welcome-pane #leave-channel {
  color: #eef2ff;
  -webkit-text-fill-color: #eef2ff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  padding-left: 16px;
}
#welcome-pane #welcome-channel option,
#welcome-pane #leave-channel option {
  color: #eef2ff;
  background: #1b1d25;
}
#welcome-pane #welcome-channel[data-has-channels="true"],
#welcome-pane #leave-channel[data-has-channels="true"] {
  text-shadow: none;
}
/* Achievements polish */
#achievements-pane .achievements-page {
  border-radius: 28px;
  border: 1px solid rgba(132, 146, 190, 0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 30px 80px rgba(0,0,0,0.24);
}
#achievements-pane .achievements-header {
  align-items: flex-start;
  gap: 24px;
}
#achievements-pane .achievements-title-row h2 {
  font-size: 34px;
  letter-spacing: -0.04em;
}
#achievements-pane .achievements-header p {
  max-width: 560px;
  color: #aeb9d8;
}
#achievements-pane .achievements-top-switch {
  background: rgba(59,130,246,0.14);
  border: 1px solid rgba(59,130,246,0.3);
  border-radius: 999px;
  padding: 8px 12px;
}
#achievements-pane .achievement-create-card,
#achievements-pane .achievement-card {
  background: linear-gradient(180deg, rgba(30,34,45,0.96), rgba(24,27,36,0.98));
  border-color: rgba(113, 125, 160, 0.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
#achievements-pane .achievement-card:hover {
  transform: translateY(-2px);
  border-color: rgba(96, 165, 250, 0.28);
  box-shadow: 0 18px 34px rgba(2, 8, 23, 0.28);
}
#achievements-pane .achievements-search {
  background: #1b1d25;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 14px;
}
/* --- Achievements Pane Extensions --- */
.ach-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
    padding: 8px 4px;
    cursor: pointer;
    transition: 0.2s;
    position: relative;
    font-family: var(--font-heading);
}

.ach-tab-btn:hover {
    color: var(--text-primary);
}

.ach-tab-btn.active {
    color: var(--accent-primary);
}

.ach-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

.ach-tab-content {
    display: none;
}

.ach-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.add-ach-card:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

/* --- Achievements Refined 'Chip' Design --- */
.ach-card-chip {
    width: 62px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.ach-card-chip::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.25), transparent);
    pointer-events: none;
}

.chip-blue { background: linear-gradient(135deg, #60a5fa, #3b82f6); }
.chip-purple { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.chip-orange { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.chip-green { background: linear-gradient(135deg, #34d399, #10b981); }
.chip-pink { background: linear-gradient(135deg, #f472b6, #db2777); }
.chip-gray { background: linear-gradient(135deg, #94a3b8, #475569); }

.achievement-card {
    background: #1b1c24;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
}

.tier-list-vertical {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 1.8rem;
}

.tier-item {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}

.tier-item span:first-child {
    font-weight: 500;
}

.tier-item span:last-child {
    color: var(--text-secondary);
}

.add-ach-card {
    border-radius: 16px;
    padding: 2rem;
    background: #14151b;
}

.add-ach-card .ach-card-chip {
    width: 58px;
    height: 34px;
    margin-bottom: 1.2rem;
}

.achievement-card .module-action-ghost {
    opacity: 0.3;
    transition: 0.2s;
}

.achievement-card:hover .module-action-ghost {
    opacity: 1;
}

/* ======================================================
   Generic .bot-style-pane Ã¢â‚¬â€ mirrors #welcome-pane rules
   so that Achievements (and future panes) share the same
   premium card-based design.
   ====================================================== */

/* --- Page Container --- */
.v3-tab-pane.bot-style-pane {
    max-width: none;
    width: 100%;
    margin: 0;
}

.bot-style-pane {
    max-width: none;
    width: 100%;
}

.bot-style-pane .welcome-bot-page {
    background: #171a22;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 22px;
    padding: 28px 28px 100px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015), 0 24px 60px rgba(0, 0, 0, 0.2);
}

/* --- Header --- */
.bot-style-pane .welcome-bot-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

.bot-style-pane .welcome-bot-header h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: #f8fafc;
}

.bot-style-pane .welcome-bot-header p {
    margin: 0;
    max-width: 980px;
    color: #a7b0c5;
    font-size: 13px;
    line-height: 1.55;
}

/* --- Module State --- */
.bot-style-pane .welcome-bot-module-state {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    color: #eef2ff;
    font-size: 13px;
    font-weight: 700;
}

.bot-style-pane .welcome-bot-state-pill {
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: rgba(59, 130, 246, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #9dc2ff;
    font-size: 13px;
    font-weight: 800;
}

/* --- Stack --- */
.bot-style-pane .welcome-bot-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bot-style-pane .welcome-bot-stack > .bento-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.bot-style-pane .welcome-bot-stack > .bento-grid > .bento-item {
    width: 100%;
    margin: 0;
}

.welcome-module-themed.welcome-theme-levels { --module-theme-accent: #8b5cf6; }
.welcome-module-themed.welcome-theme-achievements { --module-theme-accent: #f59e0b; }
.welcome-module-themed.welcome-theme-gaming { --module-theme-accent: #3b82f6; }
.welcome-module-themed.welcome-theme-music { --module-theme-accent: #ec4899; }
.welcome-module-themed.welcome-theme-starboard { --module-theme-accent: #f59e0b; }
.welcome-module-themed.welcome-theme-giveaways { --module-theme-accent: #6366f1; }
.welcome-module-themed.welcome-theme-scheduled { --module-theme-accent: #8b5cf6; }
.welcome-module-themed.welcome-theme-reaction-roles { --module-theme-accent: #ec4899; }
.welcome-module-themed.welcome-theme-welcome { --module-theme-accent: #10b981; }
.welcome-module-themed.welcome-theme-j2c { --module-theme-accent: #22d3ee; }
.welcome-module-themed.welcome-theme-sticky { --module-theme-accent: #f472b6; }
.welcome-module-themed.welcome-theme-customcmds { --module-theme-accent: #f59e0b; }
.welcome-module-themed.welcome-theme-tickets { --module-theme-accent: #10b981; }
.welcome-module-themed.welcome-theme-automod { --module-theme-accent: #ef4444; }
.welcome-module-themed.welcome-theme-cases { --module-theme-accent: #64748b; }
.welcome-module-themed.welcome-theme-logging { --module-theme-accent: #3b82f6; }
.welcome-module-themed {
    --module-theme-accent: #3b82f6;
}

.welcome-module-themed .welcome-module-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.welcome-module-themed .welcome-module-card {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #232630;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    box-shadow: none;
    transform: none;
    overflow: hidden;
}

.welcome-module-themed .welcome-module-card:hover {
    border-color: rgba(255, 255, 255, 0.08);
    transform: none;
    box-shadow: none;
}

.welcome-module-themed .welcome-module-section-head {
    min-height: 74px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
}

.welcome-module-themed .welcome-module-item-label {
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    color: #f8fafc;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.welcome-module-themed .welcome-module-generated-label span {
    display: inline-block;
}

.welcome-module-themed .welcome-module-item-label svg {
    width: 16px;
    height: 16px;
    color: var(--module-theme-accent);
    opacity: 0.92;
    flex-shrink: 0;
}

.welcome-module-themed .welcome-module-section-body {
    padding: 0 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.welcome-module-themed .welcome-module-section-body > :last-child,
.welcome-module-themed .welcome-module-surface-body > :last-child {
    margin-bottom: 0;
}

.welcome-module-themed .welcome-module-content-card .welcome-module-surface-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.welcome-module-themed .welcome-module-banner-card {
    background: linear-gradient(180deg, color-mix(in srgb, var(--module-theme-accent) 14%, transparent), rgba(59, 130, 246, 0.04));
    border-color: color-mix(in srgb, var(--module-theme-accent) 46%, rgba(255, 255, 255, 0.08));
}

.welcome-module-themed .welcome-module-banner-card .welcome-module-surface-body {
    min-height: 88px;
    padding: 22px 24px;
    display: flex;
    align-items: center;
}

.welcome-module-themed .welcome-module-banner-card .welcome-module-surface-body > div {
    width: 100%;
}

.welcome-module-themed .welcome-module-hero-card .welcome-module-hero-shell {
    display: flex;
    align-items: center;
    gap: 18px;
}

.welcome-module-themed .welcome-module-hero-card .welcome-module-hero-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--module-theme-accent);
    background: color-mix(in srgb, var(--module-theme-accent) 18%, rgba(15, 23, 42, 0.72));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--module-theme-accent) 30%, rgba(255, 255, 255, 0.04));
    flex-shrink: 0;
}

.welcome-module-themed .welcome-module-hero-card .welcome-module-hero-icon svg {
    width: 22px;
    height: 22px;
}

.welcome-module-themed .welcome-module-hero-card .welcome-module-hero-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.welcome-module-themed .welcome-module-hero-card .welcome-module-hero-kicker {
    color: color-mix(in srgb, var(--module-theme-accent) 72%, #cbd5e1);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.welcome-module-themed .welcome-module-hero-card .welcome-module-hero-copy h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.welcome-module-themed .welcome-module-hero-card .welcome-module-hero-copy p {
    margin: 0;
    color: #aeb8d2;
    font-size: 14px;
    line-height: 1.6;
    max-width: 720px;
}

.welcome-module-themed .welcome-module-auto-grid {
    display: grid;
    gap: 18px 20px;
    align-items: start;
    margin-top: 0;
}

.welcome-module-themed .welcome-module-auto-flex {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.welcome-module-themed .welcome-module-inline-setting {
    padding: 16px 18px;
    border-radius: 14px;
    background: #1b1d25;
    border: 1px solid rgba(255, 255, 255, 0.05);
    gap: 16px;
}

.welcome-module-themed .welcome-module-inline-setting > .log-switch {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
    background: transparent;
    border: none;
}

.welcome-module-themed .welcome-module-inline-setting > .log-switch:hover {
    background: transparent;
    border: none;
    transform: none;
}

.welcome-module-themed .welcome-module-inline-setting > select,
.welcome-module-themed .welcome-module-inline-setting > input,
.welcome-module-themed .welcome-module-inline-setting > button {
    width: auto;
    min-width: 160px;
    flex-shrink: 0;
}

.welcome-module-themed .welcome-module-switch-grid,
.welcome-module-themed .switch-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 0;
}

.welcome-module-themed .log-switch {
    min-height: 52px;
    border-radius: 14px;
    background: #1b1d25;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.welcome-module-themed .log-switch span {
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
}

.welcome-module-themed .welcome-module-collection-surface,
.welcome-module-themed .welcome-module-preview-surface,
.welcome-module-themed .welcome-module-visual-surface {
    background: #1b1d25;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
}

.welcome-module-themed .welcome-module-collection-surface {
    padding: 16px;
}

.welcome-module-themed .welcome-module-preview-surface,
.welcome-module-themed .welcome-module-visual-surface {
    overflow: hidden;
}

.welcome-module-themed .module-action-primary,
.welcome-module-themed .module-action-secondary,
.welcome-module-themed .module-action-ghost {
    min-height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    font-weight: 700;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.welcome-module-themed .module-action-primary {
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.24);
}

.welcome-module-themed .module-action-primary:hover {
    transform: translateY(-1px);
}

.welcome-module-themed .module-action-secondary {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #eef2ff;
}

.welcome-module-themed .module-action-ghost {
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: transparent;
    color: #a7b0c5;
}

.welcome-module-themed .welcome-module-content-card .field-group,
.welcome-module-themed .welcome-module-section-body .field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* --- Compact Row & Sections --- */
.bot-style-pane .welcome-bot-compact-row,
.bot-style-pane .welcome-bot-section {
    background: #1d2028;
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 14px;
}

.bot-style-pane .welcome-bot-compact-row {
    min-height: 70px;
    width: 100%;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 800;
    background: linear-gradient(180deg, rgba(124, 58, 237, 0.12), rgba(59, 130, 246, 0.04));
    border-color: rgba(139, 92, 246, 0.45);
    cursor: pointer;
    transition: border-color 0.2s ease, transform 0.15s ease;
}

.bot-style-pane .welcome-bot-compact-row:hover {
    border-color: rgba(139, 92, 246, 0.7);
    transform: translateY(-1px);
}

.bot-style-pane .welcome-bot-new-badge {
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.18);
    color: #74f0bb;
    font-size: 12px;
    font-weight: 800;
}

/* --- Section Head & Body --- */
.bot-style-pane .welcome-bot-section {
    overflow: hidden;
}

.bot-style-pane .welcome-bot-section-head {
    min-height: 74px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.bot-style-pane .welcome-bot-section-head h3 {
    margin: 0;
    font-size: 12px;
    line-height: 1.35;
    color: #f8fafc;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bot-style-pane .welcome-bot-section-body {
    padding: 0 22px 22px;
}

.bot-style-pane .welcome-bot-section.is-collapsed .welcome-bot-section-body {
    display: none;
}

.bot-style-pane:not(#welcome-pane) .welcome-bot-section.is-collapsed .welcome-bot-section-body {
    display: block;
}

/* --- Divider --- */
.bot-style-pane .welcome-bot-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    margin-bottom: 22px;
}

/* --- Form Grids --- */
.bot-style-pane .welcome-bot-form-grid,
.bot-style-pane .welcome-bot-card-grid,
.bot-style-pane .welcome-bot-advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.bot-style-pane .welcome-bot-card-grid-compact {
    max-width: 760px;
    gap: 16px 18px;
}

/* --- Mode Tabs --- */
.bot-style-pane .welcome-bot-mode-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 4px;
    background: #1b1e26;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-top: 4px;
}

.bot-style-pane .welcome-bot-tab {
    min-width: 138px;
    height: 48px;
    padding: 0 18px;
    border: none;
    border-radius: 9px;
    background: transparent;
    color: #8d97af;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.bot-style-pane .welcome-bot-tab.active {
    background: #353947;
    color: #f8fafc;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.bot-style-pane .welcome-bot-tab:hover:not(.active) {
    color: #c4ccde;
}

.bot-style-pane .welcome-bot-mode-tabs.is-compact {
    max-width: 260px;
}

.bot-style-pane .welcome-bot-mode-tabs.is-compact .welcome-bot-tab {
    min-width: 98px;
    padding: 0 14px;
}

/* --- Toggle Switch --- */
.bot-style-pane .welcome-bot-switch {
    position: relative;
    display: inline-flex;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.bot-style-pane .welcome-bot-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.bot-style-pane .welcome-bot-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #353947;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.bot-style-pane .welcome-bot-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.bot-style-pane .welcome-bot-switch input:checked + .welcome-bot-slider {
    background: #3b82f6;
}

.bot-style-pane .welcome-bot-switch input:checked + .welcome-bot-slider::before {
    transform: translateX(20px);
}

/* --- Form Inputs --- */
.bot-style-pane .welcome-bot-page input[type="text"],
.bot-style-pane .welcome-bot-page input[type="number"],
.bot-style-pane .welcome-bot-page select,
.bot-style-pane .welcome-bot-page textarea,
.bot-style-pane .welcome-bot-page input[type="color"] {
    background: #1b1d25;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    color: #eef2ff;
    box-shadow: none;
}

.bot-style-pane .welcome-bot-page input[type="text"],
.bot-style-pane .welcome-bot-page input[type="number"],
.bot-style-pane .welcome-bot-page select {
    min-height: 50px;
}

.bot-style-pane .welcome-bot-page textarea {
    min-height: 120px;
    padding: 14px 16px;
    resize: vertical;
    line-height: 1.55;
}

.bot-style-pane .welcome-bot-message-editor {
    width: min(520px, 100%);
    margin-top: 16px;
}

.bot-style-pane .welcome-bot-page input:focus,
.bot-style-pane .welcome-bot-page select:focus,
.bot-style-pane .welcome-bot-page textarea:focus {
    border-color: rgba(59, 130, 246, 0.38);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #181b23;
}

/* --- Preview Column --- */
.bot-style-pane .welcome-bot-preview-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 14px;
}

/* --- Primary / Secondary Buttons --- */
.bot-style-pane .welcome-bot-primary-btn {
    min-height: 44px;
    padding: 0 20px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.bot-style-pane .welcome-bot-primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.bot-style-pane .welcome-bot-secondary-btn {
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #eef2ff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: background 0.15s ease;
}

.bot-style-pane .welcome-bot-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* --- Footer --- */
.bot-style-pane .welcome-bot-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 72px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: linear-gradient(180deg, rgba(18, 20, 27, 0), #12141b 18%);
    border-radius: 0 0 22px 22px;
    z-index: 5;
}

.bot-style-pane .welcome-bot-footer-note {
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
}

.bot-style-pane .welcome-bot-footer-actions {
    display: flex;
    gap: 10px;
}

/* --- Field Group Override --- */
.bot-style-pane .field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bot-style-pane .field-group label {
    color: rgba(203, 213, 225, 0.85);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.bot-style-pane .welcome-bot-compact-row {
    display: none;
}

#achievements-pane .achievement-token-note {
    margin-top: 18px;
}

#achievements-pane .achievement-notification-surface {
    margin-top: 18px;
}

#achievements-pane .achievements-gallery-grid,
#achievements-pane #achievements-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    padding: 24px;
}

#achievements-pane .achievement-empty-card {
    grid-column: 1 / -1;
    min-height: 220px;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.24);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #94a3b8;
    text-align: center;
    padding: 28px;
}

#achievements-pane .achievement-empty-card strong {
    color: #f8fafc;
    font-size: 18px;
    font-weight: 800;
}

#achievements-pane .achievement-gallery-card {
    min-height: 320px;
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(29, 33, 45, 0.98), rgba(22, 25, 35, 0.98));
    border: 1px solid rgba(113, 125, 160, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

#achievements-pane .achievement-gallery-card:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.28);
    box-shadow: 0 18px 34px rgba(2, 8, 23, 0.28);
}

#achievements-pane .achievement-gallery-card.is-selected {
    border-color: rgba(96, 165, 250, 0.42);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.34);
}

#achievements-pane .achievement-gallery-card.is-disabled {
    opacity: 0.7;
}

#achievements-pane .achievement-gallery-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

#achievements-pane .achievement-gallery-badge-stack {
    display: flex;
    align-items: center;
    padding-left: 8px;
}

#achievements-pane .achievement-tier-badge {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    overflow: hidden;
    background: #161922;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.24);
}

#achievements-pane .achievement-tier-badge:first-child {
    margin-left: 0;
}

#achievements-pane .achievement-tier-badge-small img,
#achievements-pane .achievement-tier-badge-large img,
#achievements-pane .achievement-upload-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

#achievements-pane .achievement-tier-fallback,
#achievements-pane .achievement-upload-fallback {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #f8fafc;
    background: linear-gradient(180deg, color-mix(in srgb, var(--tier-accent, #60a5fa) 92%, white 8%), color-mix(in srgb, var(--tier-accent, #60a5fa) 72%, black 28%));
}

#achievements-pane .achievement-gallery-copy h4 {
    margin: 0 0 6px;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

#achievements-pane .achievement-gallery-copy p {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.6;
}

#achievements-pane .achievement-tier-stats {
    display: grid;
    gap: 8px;
}

#achievements-pane .achievement-tier-stat-row,
#achievements-pane .achievement-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    color: #94a3b8;
    font-size: 12px;
}

#achievements-pane .achievement-tier-stat-row span:last-child,
#achievements-pane .achievement-progress-meta span:last-child {
    color: #dbe4f3;
    font-weight: 700;
}

#achievements-pane .achievement-progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.12);
    overflow: hidden;
}

#achievements-pane .achievement-progress span {
    width: 0%;
    height: 100%;
    display: block;
    background: linear-gradient(90deg, #60a5fa, #8b5cf6);
}

#achievements-pane .achievement-gallery-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

#achievements-pane .achievement-delete-btn {
    color: #fda4af;
    border-color: rgba(248, 113, 113, 0.18);
}

#achievements-pane .achievement-editor-empty-state {
    min-height: 200px;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.2);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 28px;
}

#achievements-pane #achievement-editor-host:not(.achievement-editor-empty-state),
#achievements-pane #achievement-builder-host:not(.achievement-editor-empty-state) {
    min-height: 0;
    border: 0;
    background: transparent;
    display: block;
    padding: 0;
}

#achievements-pane .welcome-bot-section:has(#achievement-preview-card) {
    display: none !important;
}

#achievements-pane #achievement-preview-card,
#achievements-pane .ach-preview-banner,
#achievements-pane .ach-banner-wavy,
#achievements-pane .ach-hex-badge,
#achievements-pane .ach-text-content {
    display: none !important;
}

#achievements-pane .achievement-editor-shell {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#achievements-pane .achievement-editor-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr);
    max-width: 1180px;
    margin: 0 auto;
}

#achievements-pane .achievement-editor-card {
    padding: 22px;
    border-radius: 18px;
    background: #141821;
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    min-width: 0;
    max-width: 1180px;
    margin: 0 auto;
}

#achievements-pane .achievement-editor-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

#achievements-pane .achievement-editor-card-head h4 {
    margin: 0 0 4px;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 800;
}

#achievements-pane .achievement-editor-card-head p {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    line-height: 1.55;
}

#achievements-pane .achievement-inline-toggle {
    justify-content: flex-end;
    align-self: end;
}

#achievements-pane .achievement-main-upload {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 18px;
}

#achievements-pane .achievement-upload-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

#achievements-pane .achievement-upload-tile {
    min-width: 220px;
    min-height: 112px;
    padding: 14px;
    border-radius: 18px;
    border: 1px dashed rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.28);
    color: #dbe4f3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
    cursor: pointer;
}

#achievements-pane .achievement-upload-tile.has-image {
    padding: 0;
    border-style: solid;
}

#achievements-pane .achievement-upload-tile span {
    position: relative;
    z-index: 1;
    font-size: 13px;
    font-weight: 700;
}

#achievements-pane .achievement-upload-tile-small {
    min-width: 120px;
    min-height: 120px;
    flex-direction: column;
}

#achievements-pane .achievement-tier-editor-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 1040px;
}

#achievements-pane .achievement-tier-editor-row {
    display: grid;
    grid-template-columns: 320px minmax(0, 680px);
    grid-template-areas:
        "summary fields"
        "summary actions";
    gap: 18px;
    align-items: start;
    padding: 16px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

#achievements-pane .achievement-tier-editor-summary {
    grid-area: summary;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

#achievements-pane .achievement-tier-editor-media {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
}

#achievements-pane .achievement-tier-editor-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 0;
    min-width: 0;
}

#achievements-pane .achievement-tier-editor-copy strong {
    color: #f8fafc;
    font-size: 15px;
    font-weight: 800;
}

#achievements-pane .achievement-tier-editor-copy span {
    color: #94a3b8;
    font-size: 12px;
}

#achievements-pane .achievement-tier-editor-fields {
    grid-area: fields;
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
    max-width: 680px;
}

#achievements-pane .achievement-tier-editor-actions {
    grid-area: actions;
    display: flex;
    flex-direction: row;
    gap: 10px;
    min-width: 0;
    justify-content: flex-start;
    align-items: end;
    flex-wrap: wrap;
}

#achievements-pane .achievement-progress-preview-card {
    padding-bottom: 26px;
}

#achievements-pane .achievement-progress-preview-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

@media (max-width: 1080px) {
    #achievements-pane .achievement-tier-editor-row {
        grid-template-columns: 1fr;
        grid-template-areas:
            "summary"
            "fields"
            "actions";
    }

    #achievements-pane .achievement-tier-editor-actions {
        flex-direction: row;
    }
}

@media (max-width: 720px) {
    #achievements-pane .achievements-gallery-grid,
    #achievements-pane #achievements-list {
        grid-template-columns: 1fr;
        padding: 0;
    }

    #achievements-pane .achievement-tier-editor-fields {
        grid-template-columns: 1fr;
    }
}

/* --- Achievement Builder Dashboard Styling --- */
#achievements-pane .achievements-page {
    background: #0e1117;
    min-height: 100%;
    padding: 20px 0;
}

#achievements-pane .welcome-bot-stack {
    padding: 0 0 40px;
}

#achievements-pane .welcome-bot-section {
    background: #1c1f26;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

#achievements-pane .welcome-bot-section-head {
    padding: 24px 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

#achievements-pane .welcome-bot-section-head h3 {
    color: #ffffff;
    font-size: 19px;
    font-weight: 800;
    margin: 0;
}

#achievements-pane .welcome-bot-section-body {
    padding: 28px;
}

#achievements-pane .welcome-bot-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

#achievements-pane .field-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 11.5px;
    font-weight: 800;
    color: #ffffff; /* Force pure white for maximum contrast */
    text-transform: uppercase;
    letter-spacing: 1.8px;
    opacity: 1;
}

#achievements-pane input[type="text"],
#achievements-pane input[type="number"],
#achievements-pane select,
#achievements-pane textarea {
    width: 100%;
    min-height: 54px;
    padding: 14px 18px;
    background-color: #12141c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#achievements-pane textarea {
    min-height: 120px;
}

/* Specific Gallery Card Fixes */
#achievements-pane .achievement-gallery-card {
    background: #1c1f26;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#achievements-pane .achievement-gallery-card h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
}

#achievements-pane .achievement-gallery-card p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.6;
}

#achievements-pane select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%2394A3B8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 12px 8px;
    padding-right: 48px;
    cursor: pointer;
    color-scheme: dark;
}

#achievements-pane .welcome-bot-secondary-btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: #cbd5e1;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

#achievements-pane .welcome-bot-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

#achievements-pane .welcome-bot-secondary-btn.icon-btn {
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#achievements-pane .welcome-bot-secondary-btn.icon-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

#achievements-pane .achievement-tier-fallback {
    box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.2);
}

#achievements-pane input[type="color"] {
    min-height: 42px;
    width: 100%;
    padding: 4px;
    border-radius: 12px;
    background: rgba(10, 12, 18, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

#achievements-pane select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Achievement Builder Inline Switch */
#achievements-pane .welcome-bot-inline-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eef2ff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

#achievements-pane .welcome-bot-inline-switch input[type="checkbox"] {
    position: relative;
    width: 44px;
    height: 24px;
    min-height: 24px;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    background: #353947;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

#achievements-pane .welcome-bot-inline-switch input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

#achievements-pane .welcome-bot-inline-switch input[type="checkbox"]:checked {
    background: #3b82f6;
}

#achievements-pane .welcome-bot-inline-switch input[type="checkbox"]:checked::before {
    transform: translateX(20px);
}

/* Achievement notification grid layout */
#achievements-pane .achievement-notification-grid {
    padding: 20px 24px;
}

.bot-style-pane .welcome-bot-helper-card {
    padding: 18px;
    background: #1a1d25;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    color: #98a3bb;
    font-size: 14px;
    line-height: 1.6;
}

.bot-style-pane .module-overview-banner {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 24px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    background: #1a1d25;
}

.bot-style-pane .module-overview-banner-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b93ff;
    background: rgba(99, 102, 241, 0.18);
    border: 1px solid rgba(99, 102, 241, 0.24);
    flex-shrink: 0;
}

.bot-style-pane .module-overview-banner-copy span {
    display: block;
    margin-bottom: 6px;
    color: #9aa3ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.bot-style-pane .module-overview-banner-copy h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 22px;
    font-weight: 800;
}

.bot-style-pane .module-overview-banner-copy p {
    margin: 6px 0 0;
    color: #b4bed6;
    font-size: 14px;
    line-height: 1.6;
}

.bot-style-pane .module-overview-helper {
    background: linear-gradient(135deg, rgba(48, 52, 64, 0.92), rgba(36, 40, 52, 0.92));
}

.bot-style-pane .level-feature-toggle-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.bot-style-pane .level-feature-toggle-card {
    min-height: 96px;
    padding: 18px 18px 18px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(27, 29, 37, 0.7);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.bot-style-pane .level-feature-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bot-style-pane .level-feature-toggle-copy strong {
    color: #f8fafc;
    font-size: 14px;
    font-weight: 800;
}

.bot-style-pane .level-feature-toggle-copy span {
    color: #9ea9c4;
    font-size: 13px;
    line-height: 1.5;
    max-width: 280px;
}

.bot-style-pane .level-xp-curve-panel {
    margin: 20px 24px 24px;
    padding: 22px;
    border-radius: 18px;
    border: 1px solid rgba(139, 92, 246, 0.18);
    background: linear-gradient(180deg, rgba(40, 34, 60, 0.72), rgba(27, 29, 37, 0.82));
}

.bot-style-pane .level-xp-curve-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
}

.bot-style-pane .level-xp-curve-kicker {
    display: block;
    margin-bottom: 6px;
    color: #b79cff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.bot-style-pane .level-xp-curve-head h4 {
    margin: 0;
    color: #f8fafc;
    font-size: 18px;
    font-weight: 800;
}

.bot-style-pane .level-xp-curve-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    color: #aeb8d2;
    font-size: 12px;
}

.bot-style-pane .level-xp-curve-summary strong {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.bot-style-pane .level-xp-curve-chart {
    display: grid;
    gap: 10px;
}

.bot-style-pane .level-xp-curve-row {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr) 110px;
    gap: 14px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.bot-style-pane .level-xp-curve-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.bot-style-pane .level-xp-curve-meta span {
    color: #9ea9c4;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.bot-style-pane .level-xp-curve-meta strong,
.bot-style-pane .level-xp-scale-item strong {
    display: block;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 800;
}

.bot-style-pane .level-xp-curve-rail {
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.14);
    overflow: hidden;
    position: relative;
}

.bot-style-pane .level-xp-curve-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8b5cf6, #60a5fa);
    box-shadow: 0 0 18px rgba(99, 102, 241, 0.24);
}

.bot-style-pane .level-xp-curve-msg,
.bot-style-pane .level-xp-scale-item small {
    color: #7dd3fc;
    font-size: 12px;
    font-weight: 700;
    text-align: right;
}

.bot-style-pane .level-xp-curve-scale {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.bot-style-pane .level-xp-scale-item {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    background: rgba(15, 23, 42, 0.36);
    color: #aeb8d2;
    font-size: 12px;
}

.bot-style-pane .level-xp-scale-item span {
    display: block;
    margin-bottom: 4px;
    color: #9ea9c4;
}

.bot-style-pane .link-protection-grid {
    display: grid;
    grid-template-columns: minmax(280px, 380px) 1fr;
    gap: 24px;
    margin-top: 24px;
    align-items: start;
}

.bot-style-pane .link-protection-stack {
    display: grid;
    gap: 16px;
}

.bot-style-pane .link-protection-card,
.bot-style-pane .link-protection-blacklist {
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.06);
    background: rgba(27, 29, 37, 0.76);
}

.bot-style-pane .link-protection-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.bot-style-pane .link-protection-card-title {
    color: #f8fafc;
    font-size: 15px;
    font-weight: 800;
}

.bot-style-pane .link-protection-card-copy {
    margin-top: 6px;
    color: #9ea9c4;
    font-size: 13px;
    line-height: 1.5;
}

#automod-pane .automod-compact-filter-card {
    display: flex;
    flex-direction: column;
}

#automod-pane .automod-compact-filter-card .field-group {
    margin-bottom: 0;
}

#automod-pane .automod-compact-filter-stack {
    display: grid;
    gap: 8px;
    margin-top: 0.45rem;
}

#automod-pane .automod-compact-filter-card .item-label {
    margin-bottom: 0;
}

#automod-pane .automod-compact-filter-toggle {
    margin-top: 0;
}

#automod-pane .automod-compact-filter-toggle .log-switch {
    min-height: 44px;
    padding: 10px 16px;
}

#automod-pane .automod-compact-filter-input {
    margin-top: 0;
    gap: 4px;
}

#automod-pane .automod-compact-filter-input input {
    min-height: 46px;
}

@media (max-width: 1100px) {
    .bot-style-pane .level-feature-toggle-grid,
    .bot-style-pane .link-protection-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .bot-style-pane .level-xp-curve-chart,
    .bot-style-pane .level-xp-curve-scale {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* --- Channel Select in context --- */
.bot-style-pane .channel-select {
    width: 100%;
    min-height: 50px;
    background: #1b1d25;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    color: #eef2ff;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
}

.bot-style-pane .channel-select:focus {
    border-color: rgba(59, 130, 246, 0.38);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
    background: #181b23;
    outline: none;
}

/* --- Achievement-specific glass card --- */
.bot-style-pane .achievement-card-preview {
    background: rgba(30, 33, 45, 0.85);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* --- Inline Switch Override --- */
.bot-style-pane .welcome-bot-inline-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #eef2ff;
    font-size: 14px;
    font-weight: 700;
}

/* --- Required marker --- */
.bot-style-pane .welcome-required {
    color: #ef4444;
    font-weight: 700;
}

/* ======================================================
   Commands Manager V3 Ã¢â‚¬â€ Card Layout & Bulk Actions
   ====================================================== */

@media (max-width: 1024px) {
    .welcome-module-themed .welcome-module-auto-grid,
    .welcome-module-themed .welcome-module-switch-grid,
    .welcome-module-themed .switch-group {
        grid-template-columns: 1fr;
    }

    .welcome-module-themed .welcome-module-inline-setting {
        align-items: stretch;
    }

    .welcome-module-themed .welcome-module-inline-setting > select,
    .welcome-module-themed .welcome-module-inline-setting > input,
    .welcome-module-themed .welcome-module-inline-setting > button {
        width: 100%;
        min-width: 0;
    }

    .welcome-module-themed .welcome-module-hero-card .welcome-module-hero-shell {
        align-items: flex-start;
    }
}

.command-manager-group {
    margin-bottom: 2.5rem;
}

.command-header-v3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: #232630;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 16px;
    margin-bottom: 20px;
}

.command-grid-v3 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.command-card-v3 {
    background: #1e2029;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 14px;
    padding: 18px 18px 16px;
    transition: border-color 0.2s ease, transform 0.15s ease;
    min-height: 214px;
    display: flex;
    flex-direction: column;
}

.command-card-v3:hover {
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.cmd-v3-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
}

.cmd-v3-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cmd-v3-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted, #64748b);
}

.cmd-v3-name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f8fafc;
    font-family: var(--font-heading, 'Inter', sans-serif);
}

.cmd-v3-desc {
    margin: 0 0 14px;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    min-height: 58px;
}

.cmd-v3-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

#commands-pane #command-category-nav {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 0 14px;
    margin-bottom: 24px;
    background: linear-gradient(180deg, rgba(10, 12, 18, 0.96), rgba(10, 12, 18, 0.78));
    backdrop-filter: blur(12px);
    scrollbar-width: thin;
    scrollbar-color: rgba(96, 165, 250, 0.35) transparent;
}

#commands-pane #command-category-nav::-webkit-scrollbar {
    height: 6px;
}

#commands-pane #command-category-nav::-webkit-scrollbar-thumb {
    background: rgba(96, 165, 250, 0.28);
    border-radius: 999px;
}

#commands-pane #command-category-nav .cat-btn {
    flex: 0 0 auto;
}

@media (max-width: 1500px) {
    .command-grid-v3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .command-grid-v3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .command-header-v3 {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 720px) {
    .command-grid-v3 {
        grid-template-columns: 1fr;
    }
}

/* --- User Profile in Sidebar --- */
.sidebar-user {
    margin-top: auto;
    padding: 0.75rem 0; /* Move it closer to the bottom */
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-primary); /* Use theme blue instead of subtle white */
    transform: translateY(-2px); /* Add floating effect on hover */
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.user-pill img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.user-info span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-info #user-name {
    font-size: 14px;
    font-weight: 800;
    color: #f8fafc;
    margin-bottom: 2px;
}

.user-info #user-tag {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}

.user-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 1rem;
    right: 1rem;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    z-index: 100;
    transform-origin: bottom center;
    animation: slideUpFade 0.2s ease forwards;
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(10px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-dropdown a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
}

.nav-plan-badge {
    margin-left: auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.22);
    color: #f7c96d;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.v3-nav-btn.scope-disabled {
    opacity: 0.48;
}

.v3-nav-btn.scope-disabled:hover {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    transform: none;
}

.v3-nav-btn.is-locked {
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.16);
}

.dashboard-scope-bar {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
    gap: 24px;
    padding: 22px 24px;
    margin-bottom: 28px;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 35%),
        linear-gradient(180deg, rgba(20, 23, 31, 0.96), rgba(14, 17, 24, 0.96));
}

.dashboard-scope-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dashboard-scope-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.24);
    color: #93c5fd;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dashboard-scope-copy h2 {
    font-family: var(--font-heading);
    font-size: clamp(22px, 2vw, 28px);
    color: #fff;
    line-height: 1.05;
}

.dashboard-scope-copy p {
    max-width: 64ch;
    color: #98a3bb;
    font-size: 14px;
    line-height: 1.6;
}

.dashboard-scope-switcher {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-scope-button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: #eef2ff;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.dashboard-scope-button:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, 0.35);
    background: rgba(255, 255, 255, 0.05);
}

.dashboard-scope-button.active {
    border-color: rgba(96, 165, 250, 0.55);
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.18), rgba(59, 130, 246, 0.06));
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.18);
}

.dashboard-scope-button.is-disabled {
    opacity: 0.45;
}

.dashboard-scope-button-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9aa4bf;
}

.dashboard-scope-button strong {
    font-size: 16px;
    font-family: var(--font-heading);
}

.dashboard-scope-button small {
    color: #95a0ba;
    font-size: 12px;
    line-height: 1.5;
}

.dashboard-scope-notice {
    margin-bottom: 24px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(245, 158, 11, 0.18);
    background: rgba(245, 158, 11, 0.08);
    color: #f5d189;
    font-size: 13px;
    line-height: 1.55;
}

.scope-transition-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 6, 12, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
    z-index: 6000;
}

.scope-transition-overlay.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.scope-transition-card {
    width: min(420px, 100%);
    padding: 22px 22px 20px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 42%),
        linear-gradient(180deg, rgba(19, 22, 30, 0.96), rgba(12, 14, 20, 0.98));
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.scope-transition-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #98a3bb;
    margin-bottom: 10px;
}

.scope-transition-title {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 18px;
    line-height: 1.1;
}

.scope-transition-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.05);
}

.scope-transition-bar span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.88), rgba(59, 130, 246, 1));
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.35);
    transition: width 0.16s ease;
}

#scope-transition-overlay[data-scope="hosted"] .scope-transition-card {
    background:
        radial-gradient(circle at top right, rgba(226, 191, 120, 0.1), transparent 42%),
        linear-gradient(180deg, rgba(19, 22, 30, 0.96), rgba(12, 14, 20, 0.98));
    border-color: rgba(223, 182, 103, 0.14);
}

#scope-transition-overlay[data-scope="hosted"] .scope-transition-bar span {
    background: linear-gradient(90deg, rgba(240, 210, 141, 0.95), rgba(201, 151, 63, 1));
    box-shadow: 0 0 18px rgba(226, 191, 120, 0.22);
}

.hosted-overview-surface {
    margin-bottom: 28px;
}

.free-claim-surface {
    margin-bottom: 28px;
}

.hosted-overview-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
    gap: 24px;
    padding: 28px;
    border-radius: 30px;
    background:
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(23, 26, 36, 0.98), rgba(15, 18, 25, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.hosted-overview-kicker {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(236, 72, 153, 0.12);
    border: 1px solid rgba(236, 72, 153, 0.22);
    color: #f9a8d4;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.hosted-overview-shell h3 {
    font-family: var(--font-heading);
    font-size: clamp(28px, 3vw, 36px);
    color: #fff;
    line-height: 1.05;
    margin-bottom: 10px;
}

.hosted-overview-shell p {
    color: #98a3bb;
    font-size: 14px;
    line-height: 1.6;
    max-width: 56ch;
}

.hosted-overview-metrics {
    display: grid;
    gap: 12px;
}

.hosted-overview-metric {
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hosted-overview-metric span {
    display: block;
    margin-bottom: 8px;
    color: #95a0ba;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.hosted-overview-metric strong {
    color: #fff;
    font-size: 18px;
    font-family: var(--font-heading);
}

.free-claim-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.9fr);
    gap: 24px;
    padding: 24px 28px 18px;
    border-radius: 28px 28px 0 0;
    background:
        radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(18, 21, 31, 0.96), rgba(14, 17, 24, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 0;
}

.free-claim-copy h3 {
    font-family: var(--font-heading);
    font-size: clamp(24px, 2.8vw, 32px);
    color: #fff;
    line-height: 1.06;
    margin-bottom: 10px;
}

.free-claim-copy p {
    color: #98a3bb;
    font-size: 14px;
    line-height: 1.6;
    max-width: 58ch;
}

.free-claim-metrics {
    display: grid;
    gap: 12px;
}

.free-claim-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 28px 24px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top: 0;
    border-radius: 0 0 28px 28px;
    background: rgba(14, 17, 24, 0.98);
}

.free-claim-actions .welcome-bot-primary-btn,
.free-claim-actions .welcome-bot-secondary-btn {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease, opacity 0.16s ease;
}

.free-claim-actions .welcome-bot-primary-btn {
    border: none;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.free-claim-actions .welcome-bot-primary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.34);
}

.free-claim-actions .welcome-bot-secondary-btn {
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #eef2ff;
}

.free-claim-actions .welcome-bot-secondary-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

#personalizer-mini-start:disabled,
#personalizer-mini-stop:disabled,
#personalizer-mini-restart:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.free-claim-actions button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
    box-shadow: none;
    transform: none;
}

body[data-dashboard-scope="hosted"] .free-claim-actions .welcome-bot-primary-btn {
    background: linear-gradient(135deg, #efd28e, #c9973f);
    color: #1c1408;
    box-shadow: 0 10px 24px rgba(201, 151, 63, 0.18);
}

body[data-dashboard-scope="hosted"] .free-claim-actions .welcome-bot-primary-btn:hover:not(:disabled) {
    box-shadow: 0 14px 30px rgba(201, 151, 63, 0.24);
}

body[data-dashboard-scope="hosted"] .free-claim-actions .welcome-bot-secondary-btn {
    border-color: rgba(223, 182, 103, 0.18);
    background: rgba(223, 182, 103, 0.06);
    color: #f7e3b4;
}

body[data-dashboard-scope="hosted"] .free-claim-actions .welcome-bot-secondary-btn:hover:not(:disabled) {
    background: rgba(223, 182, 103, 0.1);
    border-color: rgba(223, 182, 103, 0.28);
}

.module-card-gate-note {
    display: none !important;
}

.module-card.is-locked {
    border-color: rgba(245, 158, 11, 0.24);
}

.personalizer-premium-banner {
    border-color: rgba(245, 158, 11, 0.22);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.09), rgba(26, 29, 37, 0.96));
}

.personalizer-premium-banner-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.personalizer-premium-banner-head strong {
    color: #fff;
    font-family: var(--font-heading);
}

.dash-main {
    margin-left: 240px;
    width: calc(100% - 240px);
    min-height: 100vh;
    padding: 2.5rem 3.5rem;
    scroll-behavior: smooth;
    position: relative;
    z-index: 10;
    overflow-x: hidden;
    background: radial-gradient(circle at 10% 20%, rgba(124, 102, 255, 0.03) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.03) 0%, transparent 40%);
}

.v3-tab-pane.bot-style-pane .bento-grid {
    gap: 12px;
    border-radius: 18px;
    padding: 20px;
}

.v3-tab-pane.bot-style-pane .bento-item {
    border-radius: 12px;
    padding: 18px;
}

.v3-tab-pane.bot-style-pane .item-label {
    min-height: 52px;
    padding: 0 18px;
    margin: -18px -18px 16px -18px;
    font-size: 12px;
}

.module-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
    align-items: start;
}

.module-card {
    padding: 1.15rem;
    gap: 0.8rem;
    min-height: 196px;
    align-self: start;
}

.module-card-icon {
    width: 42px;
    height: 42px;
}

.module-card-title {
    font-size: 16px;
    margin-bottom: 0.35rem;
}

.module-card-desc {
    font-size: 12px;
    line-height: 1.45;
}

.bot-style-pane .welcome-bot-page {
    border-radius: 18px;
    padding: 20px 20px 84px;
}

.bot-style-pane .welcome-bot-header {
    gap: 18px;
    margin-bottom: 16px;
}

.bot-style-pane .welcome-bot-header h2 {
    font-size: 24px;
}

.bot-style-pane .welcome-bot-form-grid,
.bot-style-pane .welcome-bot-card-grid,
.bot-style-pane .welcome-bot-advanced-grid {
    gap: 14px 16px;
}

.bot-style-pane .welcome-bot-page input[type="text"],
.bot-style-pane .welcome-bot-page input[type="number"],
.bot-style-pane .welcome-bot-page select {
    min-height: 44px;
}

.bot-style-pane .welcome-bot-page textarea {
    min-height: 96px;
}

.bot-style-pane .welcome-bot-primary-btn,
.bot-style-pane .welcome-bot-secondary-btn {
    min-height: 40px;
    padding: 0 16px;
    font-size: 13px;
}

.level-reward-builder {
    background: linear-gradient(180deg, rgba(13, 16, 24, 0.96), rgba(17, 20, 28, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
}

.level-reward-builder-grid {
    display: grid;
    grid-template-columns: minmax(170px, 1fr) minmax(0, 2fr);
    gap: 1rem;
    align-items: center;
}

.bot-style-pane .welcome-bot-page .level-reward-field {
    min-height: 48px;
    background: #0f172a;
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 10px;
    color: #f8fafc;
    padding: 0 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.bot-style-pane .welcome-bot-page .level-reward-field::placeholder {
    color: #94a3b8;
}

.bot-style-pane .welcome-bot-page .level-reward-field:focus {
    background: #10192f;
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.bot-style-pane .welcome-bot-page .level-reward-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color-scheme: dark;
    padding-right: 42px;
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0)), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25L7 9.25L11 5.25' stroke='%23cbd5e1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, right 14px center;
    background-size: auto, 14px 14px;
}

.bot-style-pane .welcome-bot-page .level-reward-select option {
    background: #111827;
    color: #f8fafc;
}

@media (max-width: 900px) {
    .level-reward-builder-grid {
        grid-template-columns: 1fr;
    }
}

.dashboard-scope-bar {
    gap: 18px;
    padding: 18px 20px;
    border-radius: 22px;
}

.dashboard-scope-button {
    gap: 6px;
    padding: 14px;
    border-radius: 18px;
}

.hosted-overview-shell {
    gap: 18px;
    padding: 20px 22px;
    border-radius: 22px;
}

.free-claim-shell {
    gap: 18px;
    padding: 18px 22px 14px;
    border-radius: 22px 22px 0 0;
}

.free-claim-actions {
    padding: 0 22px 20px;
    border-radius: 0 0 22px 22px;
}

.personalizer-section-shell {
    padding: 18px 20px;
}

.personalizer-section-headline {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.personalizer-section-headline h4 {
    margin: 0;
    color: #fff;
}

.personalizer-section-headline p {
    margin: 0;
    color: #8f97ae;
    font-size: 13px;
    line-height: 1.55;
}

.personalizer-inline-btn {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 12px;
}

.personalizer-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.personalizer-media-card {
    padding: 16px;
    border-radius: 14px;
    background: #1b1d25;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.personalizer-media-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.personalizer-media-preview {
    min-height: 120px;
    border-radius: 14px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8f97ae;
    font-size: 12px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.personalizer-media-preview.has-image {
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.08);
}

.personalizer-avatar-preview {
    width: 112px;
    min-height: 0;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
}

.personalizer-banner-preview {
    min-height: 112px;
}

.personalizer-profile-note {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.personalizer-live-profile-card {
    height: 100%;
}

.personalizer-live-profile {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.personalizer-live-avatar {
    width: 92px;
    height: 92px;
    border-radius: 22px;
    background: linear-gradient(180deg, #2b3040, #1c1f28);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.04em;
    flex-shrink: 0;
}

.personalizer-live-avatar.has-image {
    color: transparent;
}

.personalizer-live-copy {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.personalizer-live-name {
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.personalizer-live-meta {
    color: #98a1bb;
    font-size: 12px;
}

.personalizer-live-bio {
    color: #c8d0e8;
    font-size: 13px;
    line-height: 1.55;
    max-width: 56ch;
}

#personalizer-bio {
    min-height: 120px;
}

.welcome-module-themed .welcome-bot-stack {
    gap: 14px;
}

.welcome-module-themed .welcome-module-grid {
    gap: 14px;
}

.welcome-module-themed .welcome-module-card {
    border-radius: 18px;
}

.welcome-module-themed .welcome-module-section-head {
    padding: 14px 16px 0;
}

.welcome-module-themed .welcome-module-section-body,
.welcome-module-themed .welcome-module-surface-body {
    padding: 14px 16px 16px;
}

.welcome-module-themed .welcome-module-section-body .input-field,
.welcome-module-themed .welcome-module-section-body .welcome-bot-textarea,
.welcome-module-themed .welcome-module-surface-body .input-field,
.welcome-module-themed .welcome-module-surface-body .welcome-bot-textarea {
    min-height: auto;
}

.command-header-v3 {
    padding: 0.85rem 1.1rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}

.command-manager-group {
    margin-bottom: 1.5rem;
}

.command-card-v3 {
    border-radius: 16px;
    padding: 1rem;
    gap: 0.7rem;
}

.cmd-v3-desc {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

.cmd-v3-support,
.cmd-v3-inline-note {
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.45;
}

.status-pill.disabled {
    cursor: not-allowed;
    opacity: 0.7;
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.status-pill.disabled .dot-indicator {
    background: var(--text-muted);
}

@media (max-width: 1100px) {
    .dashboard-scope-bar,
    .hosted-overview-shell,
    .free-claim-shell {
        grid-template-columns: 1fr;
    }

    .personalizer-check-grid,
    .personalizer-profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .dashboard-scope-switcher {
        grid-template-columns: 1fr;
    }
}


/* --- Mobile System Support (Final Polish) --- */
.mobile-top-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 1.25rem;
    background: rgba(10, 10, 12, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
}
 
/* --- Mobile Support & Responsiveness (Premium Fix) --- */

.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 64px;
    background: rgba(18, 18, 22, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
    z-index: 2000;
}

.hamburger-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.hamburger-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-active);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2900;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}





/* --- Mobile High-Specificity Overrides (v4.53) --- */
@media screen and (max-width: 1024px) {
    body #dashboard-view .sidebar {
        position: fixed !important;
        transform: translateX(-100%) !important;
        width: 240px !important;
        min-width: 240px !important;
        display: flex !important;
        z-index: 6000 !important;
        transition: transform 0.4s ease !important;
        left: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
    }
    body #dashboard-view .sidebar.active {
        transform: translateX(0) !important;
        box-shadow: 20px 0 60px rgba(0, 0, 0, 0.8) !important;
    }
    .mobile-top-bar {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        height: 72px !important;
        background: #0f0f14 !important;
        z-index: 5000 !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 1.5rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    }
    .dash-main {
        margin-left: 0 !important;
        width: 100% !important;
        min-height: 100vh;
        padding: calc(72px + 1.5rem) 1.5rem 2.5rem !important;
        scroll-behavior: smooth;
        position: relative;
        z-index: 10;
        overflow-x: hidden;
    }
    body, html { overflow-x: hidden !important; overflow-y: auto !important; height: auto !important; }
    .dash-layout, .dash-main, .bento-grid-v3 { height: auto !important; overflow-y: visible !important; overflow-x: hidden !important; }
}

/* --- New Achievement Design System (Injected) --- */
:root {
    --tier-bronze: #a8a9ad;
    --tier-silver: #a8a9ad;
    --tier-gold: #f6c444;
    --tier-diamond: #00b4f0;
}

.ach-preview-banner {
    width: 100% !important;
    min-height: 180px !important;
    background: #111214 !important;
    border-radius: 12px !important;
    border: 3px solid var(--ach-tier-color, var(--tier-bronze)) !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    align-items: center !important;
    padding: 30px !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
}

.ach-banner-wavy {
    position: absolute !important;
    inset: 0 !important;
    opacity: 0.05 !important;
    background-image: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        #fff 20px,
        #fff 22px
    ),
    repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 20px,
        #fff 20px,
        #fff 22px
    ) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}

.ach-hex-badge {
    width: 120px !important;
    height: 120px !important;
    position: relative !important;
    z-index: 1 !important;
    flex-shrink: 0 !important;
    margin-right: 30px !important;
    filter: drop-shadow(0 0 15px var(--ach-tier-glow, rgba(168, 169, 173, 0.3))) !important;
}

.ach-hex-shape {
    width: 100% !important;
    height: 100% !important;
    background: var(--ach-tier-color, var(--tier-bronze)) !important;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.ach-hex-inner {
    width: 88% !important;
    height: 88% !important;
    background: #1a1b1e !important;
    clip-path: inherit !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
}

.ach-hex-border {
    position: absolute !important;
    inset: 6% !important;
    border: 2px solid var(--ach-tier-color, var(--tier-bronze)) !important;
    clip-path: inherit !important;
    pointer-events: none !important;
    opacity: 0.6 !important;
}

.ach-hex-content {
    font-size: 50px !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.ach-hex-content img {
    width: 70px !important;
    height: 70px !important;
    object-fit: contain !important;
}

.ach-text-content {
    position: relative !important;
    z-index: 1 !important;
    flex: 1 !important;
}

.ach-label {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--ach-tier-color, var(--tier-bronze)) !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    margin-bottom: 6px !important;
    display: block !important;
}

.ach-title {
    font-size: 32px !important;
    font-weight: 800 !important;
    color: white !important;
    line-height: 1.1 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

.ach-requirement {
    font-size: 16px !important;
    color: #a8a9ad !important;
    opacity: 0.8 !important;
    display: block !important;
}

/* Custom Artwork Hexagon Preview */
.artwork-hex-preview {
    width: 100px !important;
    height: 100px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px dashed rgba(255, 255, 255, 0.2) !important;
    clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-right: 15px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.artwork-hex-preview img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

#achievements-pane .achievement-tier-accordion {
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    background: #181b23;
    overflow: hidden;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#achievements-pane .achievement-tier-accordion.is-open {
    border-color: rgba(59,130,246,0.55);
    box-shadow: 0 12px 28px rgba(8,11,18,0.28);
    background: #171a22;
}

#achievements-pane .achievement-tier-summary {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 20px;
    color: inherit;
    cursor: pointer;
}

#achievements-pane .achievement-tier-summary:hover {
    background: rgba(255,255,255,0.015);
}

#achievements-pane .achievement-tier-summary-media {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

#achievements-pane .achievement-tier-summary-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 8px 18px rgba(0,0,0,0.22);
}

#achievements-pane .achievement-tier-summary-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

#achievements-pane .achievement-tier-summary-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    text-align: left;
}

#achievements-pane .achievement-tier-summary-copy strong {
    color: #f8fafc;
    font-size: 16px;
    font-weight: 800;
}

#achievements-pane .achievement-tier-summary-copy span {
    color: #91a2c8;
    font-size: 13px;
}

#achievements-pane .achievement-tier-summary-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

#achievements-pane .achievement-tier-summary-reward {
    color: #9cb1da;
    font-size: 12px;
    font-weight: 700;
}

#achievements-pane .achievement-tier-chevron {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #35394a;
    color: #d7def2;
    font-size: 18px;
    line-height: 1;
}

#achievements-pane .achievement-tier-panel {
    padding: 0 20px 20px;
}

#achievements-pane .achievement-tier-panel-inner {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#achievements-pane .achievement-tier-panel .field-group label {
    color: #ffffff;
}

#achievements-pane .achievement-tier-rewards-head {
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

#achievements-pane .achievement-tier-rewards-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#achievements-pane .achievement-tier-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

#achievements-pane .achievement-tier-toggle-copy strong {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
}

#achievements-pane .achievement-badge-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(7,10,16,0.74);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 24px;
}

#achievements-pane .achievement-badge-modal {
    width: min(560px, 100%);
    max-height: 86vh;
    overflow: auto;
    background: #1d2029;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
}

#achievements-pane .achievement-badge-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

#achievements-pane .achievement-badge-modal-head h4 {
    margin: 0;
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}

#achievements-pane .achievement-badge-modal-head p {
    margin: 6px 0 0;
    color: #94a3b8;
}

#achievements-pane .achievement-badge-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

#achievements-pane .achievement-badge-modal-preview {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
}

#achievements-pane .achievement-badge-modal-preview-icon {
    width: 96px;
    height: 96px;
    border-radius: 26px;
    overflow: hidden;
    flex-shrink: 0;
}

#achievements-pane .achievement-badge-modal-preview-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

#achievements-pane .achievement-badge-modal-preview strong {
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

#achievements-pane .achievement-badge-modal-preview span {
    display: block;
    margin-top: 4px;
    color: #94a3b8;
    font-size: 14px;
}

#achievements-pane .achievement-badge-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
    gap: 12px;
}

#achievements-pane .achievement-badge-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

#achievements-pane .achievement-badge-section-title {
    color: #cfd6e7;
    font-size: 14px;
    font-weight: 800;
}

#achievements-pane .achievement-badge-shape-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 12px;
}

#achievements-pane .achievement-badge-shape-option {
    border: 1px solid rgba(255,255,255,0.08);
    background: #141821;
    border-radius: 18px;
    padding: 10px;
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

#achievements-pane .achievement-badge-shape-option:hover,
#achievements-pane .achievement-badge-shape-option.is-active {
    border-color: rgba(59,130,246,0.85);
    background: #182031;
    transform: translateY(-1px);
}

#achievements-pane .achievement-badge-shape-option img {
    width: 100%;
    display: block;
}

#achievements-pane .achievement-badge-icon-option {
    border: 1px solid rgba(255,255,255,0.08);
    background: #141821;
    border-radius: 16px;
    padding: 10px;
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

#achievements-pane .achievement-badge-icon-option:hover,
#achievements-pane .achievement-badge-icon-option.is-active {
    border-color: rgba(59,130,246,0.85);
    background: #182031;
    transform: translateY(-1px);
}

#achievements-pane .achievement-badge-icon-option img {
    width: 100%;
    height: 100%;
    display: block;
}

#achievements-pane .achievement-badge-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

#achievements-pane .achievement-builder-preview-wrap {
    margin: 0 28px 28px;
    padding: 24px;
    background: #0f1218;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#achievements-pane .achievement-builder-preview-head strong {
    display: block;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

#achievements-pane .achievement-builder-preview-head p {
    margin: 6px 0 0;
    color: #94a3b8;
    font-size: 13px;
}

#achievements-pane .achievement-unlock-showcase {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

#achievements-pane .builder-unlock-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 26px;
    align-items: center;
    min-height: 190px;
    padding: 26px 34px;
    border-radius: 26px;
    border: 4px solid var(--achievement-preview-accent);
    background:
        linear-gradient(135deg, rgba(255,255,255,0.03) 25%, transparent 25%, transparent 50%, rgba(255,255,255,0.03) 50%, rgba(255,255,255,0.03) 75%, transparent 75%, transparent),
        #161922;
    background-size: 120px 120px, auto;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

#achievements-pane .builder-unlock-card.is-bronze {
    background-color: #161922;
}

#achievements-pane .builder-unlock-card.is-silver {
    background-color: #161922;
}

#achievements-pane .builder-unlock-card.is-gold {
    background-color: #161922;
}

#achievements-pane .builder-unlock-card.is-diamond {
    background-color: #161922;
}

#achievements-pane .builder-unlock-card-badge img {
    width: 140px;
    height: 140px;
    display: block;
    filter: drop-shadow(0 18px 30px rgba(0,0,0,0.32));
}

#achievements-pane .builder-unlock-card-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#achievements-pane .builder-unlock-card-label {
    color: var(--achievement-preview-accent);
    font-size: 17px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-weight: 900;
}

#achievements-pane .builder-unlock-card-copy strong {
    color: #fff;
    font-size: 46px;
    line-height: 1.1;
}

#achievements-pane .builder-unlock-card-copy p {
    margin: 0;
    color: #a8aec1;
    font-size: 28px;
    line-height: 1.5;
}

/* Final Achievement Gallery Polish */
#achievements-pane .achievement-gallery-card {
    min-height: 0;
    padding: 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.03), transparent 28%),
        linear-gradient(180deg, #1a1d25 0%, #151922 100%);
    border: 1px solid rgba(124, 143, 182, 0.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    gap: 18px;
    overflow: hidden;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

#achievements-pane .achievement-gallery-card:hover {
    transform: translateY(-3px);
    border-color: rgba(83, 141, 255, 0.34);
    box-shadow: 0 18px 36px rgba(3, 8, 20, 0.34);
}

#achievements-pane .achievement-gallery-card.is-selected {
    border-color: rgba(83, 141, 255, 0.58);
    box-shadow: 0 20px 44px rgba(7, 12, 24, 0.38);
}

#achievements-pane .achievement-gallery-card-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
}

#achievements-pane .achievement-gallery-badge-stack {
    min-width: 0;
    padding-left: 0;
}

#achievements-pane .achievement-gallery-card-top .welcome-bot-switch {
    justify-self: end;
    align-self: start;
    margin-top: 2px;
}

#achievements-pane .achievement-tier-badge {
    width: 56px;
    height: 56px;
    margin-left: -12px;
    border-radius: 18px;
    background: #12161f;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 14px 28px rgba(5, 10, 20, 0.3);
}

#achievements-pane .achievement-gallery-copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#achievements-pane .achievement-gallery-kicker {
    color: #79a8ff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

#achievements-pane .achievement-gallery-copy h4 {
    margin: 0;
    color: #f8fbff;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#achievements-pane .achievement-gallery-copy p {
    margin: 0;
    color: #8f9db7;
    font-size: 13px;
    line-height: 1.65;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#achievements-pane .achievement-tier-stats {
    gap: 10px;
    padding: 14px 14px 12px;
    border-radius: 16px;
    background: rgba(10, 13, 20, 0.38);
    border: 1px solid rgba(255,255,255,0.05);
}

#achievements-pane .achievement-tier-stat-row,
#achievements-pane .achievement-progress-meta {
    font-size: 12px;
}

#achievements-pane .achievement-tier-stat-row span:first-child,
#achievements-pane .achievement-progress-meta span:first-child {
    color: #8ea0bf;
}

#achievements-pane .achievement-tier-stat-row span:last-child,
#achievements-pane .achievement-progress-meta span:last-child {
    color: #f0f5ff;
}

#achievements-pane .achievement-progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    overflow: hidden;
}

#achievements-pane .achievement-progress span {
    display: block;
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #79a8ff, #9cf0ff);
}

#achievements-pane .achievement-gallery-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: auto;
}

#achievements-pane .achievement-card-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.03);
    color: #eef4ff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

#achievements-pane .achievement-card-btn:hover {
    background: rgba(88, 128, 214, 0.14);
    border-color: rgba(88, 128, 214, 0.3);
    transform: translateY(-1px);
}

#achievements-pane .achievement-card-btn-danger {
    color: #ffb7b7;
    background: rgba(120, 32, 32, 0.12);
    border-color: rgba(214, 82, 82, 0.14);
}

#achievements-pane .achievement-card-btn-danger:hover {
    background: rgba(145, 37, 37, 0.18);
    border-color: rgba(227, 95, 95, 0.24);
}

.honeypot-panel {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.honeypot-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.85fr);
    gap: 20px;
    margin-top: 18px;
}

.honeypot-config-column,
.honeypot-side-card {
    background: #232630;
    border: 1px solid rgba(255, 255, 255, 0.045);
    border-radius: 18px;
    padding: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.015);
}

.honeypot-side-column {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.honeypot-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 2px 0 4px;
}

.honeypot-card-title,
.honeypot-side-card-title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
}

.honeypot-card-copy,
.honeypot-side-card-copy {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.5;
}

.honeypot-log-list,
.honeypot-chip-list {
    background: rgba(255, 255, 255, 0.018);
    border: 1px solid rgba(255, 255, 255, 0.035);
    border-radius: 14px;
    padding: 12px;
}

.honeypot-chip {
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.honeypot-role-picker-row .welcome-bot-secondary-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

.honeypot-role-picker-row .welcome-bot-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.honeypot-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.honeypot-inline-toggles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 8px 0 18px;
}

.honeypot-role-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 14px;
}

.honeypot-chip-list {
    min-height: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.honeypot-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.22);
    color: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}

.honeypot-chip button {
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 15px;
    line-height: 1;
    padding: 0;
}

.honeypot-analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.honeypot-log-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.honeypot-log-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #0f131d;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.honeypot-log-primary {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.honeypot-log-primary strong {
    font-size: 13px;
    color: #fff;
}

.honeypot-log-primary span,
.honeypot-log-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.honeypot-log-meta {
    white-space: nowrap;
    text-align: right;
}

.honeypot-empty-state {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 8px 0;
}

@media (max-width: 1100px) {
    .honeypot-grid,
    .honeypot-analytics-grid,
    .honeypot-inline-toggles {
        grid-template-columns: 1fr;
    }
}
