:root {
    /* Color Palette based on Breez On Top - Reddish Horror Skull Theme */
    --bg-dark: #0a0505;
    --bg-panel: #120909;
    --bg-panel-hover: #1e0f0f;
    --accent-primary: #ff2a2a;
    /* Neon horror blood red */
    --accent-glow: rgba(255, 42, 42, 0.45);
    --accent-red: #ff6600; /* Eerie orange / ember fire */
    --accent-red-glow: rgba(255, 102, 0, 0.35);
    --text-primary: #ffffff;
    --text-secondary: #a99e9e; /* Slightly reddish-tinted grey */
    --border-color: rgba(255, 42, 42, 0.12);

    /* Variables */
    --header-height: 80px;
    --transition-speed: 0.3s;
    --font-main: 'Outfit', sans-serif;

    /* Button sizing tokens */
    --btn-height:     clamp(38px, 4.5vw, 44px);
    --btn-padding-x:  clamp(14px, 2.5vw, 22px);
    --btn-font-size:  clamp(12px, 1.4vw, 14px);
    --btn-icon-size:  15px;   /* scaled down in media queries */
    --btn-radius:     10px;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* ====== HEADER ====== */
.header {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 48px);
    max-width: 1400px;
    height: var(--header-height);
    background-color: rgba(20, 22, 23, 0.75);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.header.scrolled {
    background-color: rgba(18, 20, 21, 0.9);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    top: 12px;
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
}

/* Animated Bottom Border */
.header__border-glow {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.header:hover .header__border-glow {
    opacity: 0.5;
}

/* Logo */
.header__logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

.header__logo-icon-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px rgba(255, 42, 42, 0.3));
    transition: transform var(--transition-speed) ease;
}

.header__logo:hover .header__logo-img {
    transform: scale(1.05) rotate(5deg);
}

.header__logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background-color: var(--accent-primary);
    border-radius: 50%;
    filter: blur(15px);
    opacity: 0.6;
    z-index: 1;
    transition: opacity var(--transition-speed) ease;
}

.header__logo:hover .header__logo-glow {
    opacity: 0.9;
    filter: blur(20px);
}

.header__logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    display: flex;
    gap: 6px;
    text-transform: uppercase;
}

.header__logo-afk {
    color: var(--text-primary);
}

.header__logo-core {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(255, 42, 42, 0.3);
}

/* Navigation */
.header__nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-panel);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.header__nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
}

.header__nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: all var(--transition-speed) ease;
}

.header__nav-link:hover {
    color: var(--text-primary);
    background-color: var(--bg-panel-hover);
}

.header__nav-link:hover .header__nav-icon {
    opacity: 1;
    transform: scale(1.1);
}

.header__nav-link--active {
    color: var(--accent-primary);
    background-color: rgba(255, 42, 42, 0.1);
}

.header__nav-link--active .header__nav-icon {
    opacity: 1;
}

/* Right Section */
.header__right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Status Indicator */
.header__status {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-panel);
    padding: 8px 14px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.header__status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }

    100% {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* Icon Buttons */
.header__icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.header__icon-btn svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-speed) ease;
}

.header__icon-btn:hover {
    color: var(--text-primary);
    background-color: var(--bg-panel-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.header__icon-btn:hover svg {
    transform: scale(1.1);
}

.header__icon-btn-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-primary);
    color: #000;
    font-size: 11px;
    font-weight: 800;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(255, 42, 42, 0.4);
    border: 2px solid var(--bg-panel);
}

/* Hamburger Menu (Mobile) */
.header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.header__hamburger span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-speed) ease;
}

/* Demo Content Area */
.demo-content {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: radial-gradient(circle at center, #1a1d1f 0%, #121415 100%);
}

.demo-content__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.text-glow {
    color: var(--accent-primary);
    text-shadow: 0 0 20px rgba(255, 42, 42, 0.4);
}

.demo-content__subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

/* Responsive Design */
@media (max-width: 992px) {
    .header__nav {
        position: absolute;
        top: calc(100% + 15px);
        left: 50%;
        transform: translateX(-50%) translateY(-20px);
        flex-direction: column;
        width: calc(100% - 48px);
        max-width: 340px;
        background-color: rgba(20, 22, 23, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 15px;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all var(--transition-speed) ease;
        border: 1px solid var(--border-color);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    }

    .header__nav.mobile-active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
    
    .header__nav-link {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .header__hamburger {
        display: flex;
    }
    
    .header__status {
        display: none;
    }
}

@media (max-width: 480px) {
    .header {
        top: 12px;
        width: calc(100% - 24px);
        border-radius: 16px;
    }

    .header__logo-text {
        font-size: 18px;
    }

    .header__logo-icon-wrap {
        width: 34px;
        height: 34px;
    }
}

/* ====== AUTHENTICATION MODAL ====== */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-dark);
    z-index: 9999;
    /* Above everything */
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(20px);
}

.auth-modal.hidden {
    display: none;
}

.auth-modal__content {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.auth-modal__content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
}

.auth-modal__header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-modal__logo {
    width: 64px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 10px rgba(255, 42, 42, 0.4));
}

.auth-modal__header h2 {
    font-size: 24px;
    margin-bottom: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-modal__header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    transition: all var(--transition-speed) ease;
}

.form-group input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(255, 42, 42, 0.2);
}

.btn-primary {
    background-color: var(--accent-primary);
    color: #000;
    border: none;
    border-radius: var(--btn-radius);
    padding: 0 var(--btn-padding-x);
    height: var(--btn-height);
    font-size: var(--btn-font-size);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    font-family: var(--font-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* flex-shrink and white-space are intentionally omitted here;
       context-specific rules (e.g. .vc-action-buttons) handle sizing */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 42, 42, 0.4);
}

.auth-message {
    font-size: 13px;
    text-align: center;
    font-weight: 600;
    min-height: 20px;
}

.auth-message.error { color: #ff5252; }
.auth-message.success { color: var(--accent-primary); }
.auth-message.warning { color: #ffd740; }

/* ====== TAB VIEWS ====== */
.tab-view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ====== DASHBOARD LAYOUT (SIDEBAR + MAIN) ====== */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 120px);
    max-width: 1400px;
    margin: 0 auto;
    padding: clamp(10px, 1.5vw, 16px) clamp(12px, 2vw, 24px) clamp(12px, 2vw, 24px);
    gap: clamp(12px, 2vw, 24px);
}

/* Sidebar */
.dashboard-sidebar {
    width: clamp(180px, 20vw, 220px);
    flex-shrink: 0;
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-self: flex-start;
    position: sticky;
    top: 120px;
}

.sidebar-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    padding: 0 4px;
}

.sidebar-server-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 320px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.sidebar-server-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.sidebar-server-item:hover {
    background-color: var(--bg-panel-hover);
    border-color: var(--border-color);
}

.sidebar-server-item.active {
    background-color: rgba(255, 42, 42, 0.08);
    border-color: rgba(255, 42, 42, 0.2);
}

.sidebar-server-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
    background-color: #2f3136;
    flex-shrink: 0;
}

.sidebar-server-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.sidebar-server-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-server-id {
    font-size: 10px;
    font-family: monospace;
    color: var(--text-secondary);
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-server-remove {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.sidebar-server-item:hover .sidebar-server-remove {
    opacity: 1;
}

.sidebar-server-remove:hover {
    color: #ff5252;
    background-color: rgba(255, 82, 82, 0.1);
}

.sidebar-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
    padding: 10px;
    border-radius: 10px;
    border: 1px dashed var(--border-color);
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-add-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background-color: rgba(255, 42, 42, 0.05);
}

/* Main Content Area */
.dashboard-main {
    flex: 1;
    min-width: 0;
}

/* ====== DASHBOARD CONTENT (Accounts view) ====== */
.dashboard-content {
    padding: clamp(16px, 3vw, 24px);
    max-width: 1000px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 800;
    margin-bottom: 6px;
}

.dashboard-subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.85rem, 1.5vw, 0.95rem);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-card {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    transition: all var(--transition-speed) ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 42, 42, 0.3);
}

.stat-card__title {
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 700;
}

.stat-card__value {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--text-primary);
}

/* Welcome Panel */
.dashboard-welcome-panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.dashboard-welcome-panel .welcome-icon {
    margin-bottom: 8px;
    opacity: 0.8;
}

.dashboard-welcome-panel h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.dashboard-welcome-panel p {
    color: var(--text-secondary);
    max-width: 400px;
    font-size: 14px;
    line-height: 1.6;
}

/* Accounts List */
.accounts-container h3 {
    margin-bottom: 20px;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.accounts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.account-item {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all var(--transition-speed) ease;
}

.account-item:hover {
    background-color: var(--bg-panel-hover);
    border-color: rgba(255, 255, 255, 0.15);
}

.account-item__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.account-item__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    background-color: #2f3136;
}

.account-item__details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-item__name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.account-item__status {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #747f8d;
}

.status-dot.online {
    background-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

.btn-remove {
    background-color: rgba(255, 82, 82, 0.1);
    color: #ff5252;
    border: 1px solid rgba(255, 82, 82, 0.3);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    font-family: var(--font-main);
}

.dashboard-header__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--bg-panel);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    font-family: var(--font-main);
}

.btn-secondary:hover {
    background-color: var(--bg-panel-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

.account-item__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.account-item__meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-edit-profile {
    background-color: rgba(88, 101, 242, 0.12);
    color: #8b9cff;
    border: 1px solid rgba(88, 101, 242, 0.35);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    font-family: var(--font-main);
}

.btn-edit-profile:hover {
    background-color: #5865f2;
    color: #fff;
    border-color: #5865f2;
}

.profile-edit-modal__content {
    max-width: 920px;
    width: min(96vw, 920px);
    position: relative;
}

.profile-edit-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
}

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

.profile-edit-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 8px;
}

.profile-edit-col textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
}

.profile-field-hint {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 6px;
    line-height: 1.4;
}

.profile-avatar-upload {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.profile-avatar-preview {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.profile-avatar-preview.hidden {
    display: none;
}

.profile-avatar-library {
    margin-top: 12px;
    max-height: 160px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 8px;
    padding: 4px;
}

.profile-avatar-library__loading,
.profile-avatar-library__empty {
    grid-column: 1 / -1;
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

.profile-avatar-pick {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-dark);
    aspect-ratio: 1;
}

.profile-avatar-pick img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-pick:hover,
.profile-avatar-pick.selected {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary);
}

.profile-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.profile-edit-actions .btn-primary {
    flex: 1;
}

.profile-edit-btn-cancel {
    background: var(--bg-panel) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
}

.profile-edit-btn-cancel:hover {
    color: var(--text-primary) !important;
}

.btn-remove:hover {
    background-color: #ff5252;
    color: #fff;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.admin-link {
    color: var(--text-secondary);
    font-size: 12px;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.admin-link:hover {
    color: var(--accent-primary);
}


/* ====== SERVER DETAIL & VC PANEL ====== */
.server-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background-color: var(--bg-panel);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    min-height: 350px;
    animation: fadeIn 0.4s ease;
}

.server-empty-state h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-top: 16px;
    margin-bottom: 8px;
}

.server-empty-state p {
    color: var(--text-secondary);
    max-width: 320px;
    font-size: 14px;
    line-height: 1.5;
}

.server-detail {
    background-color: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: clamp(16px, 2.5vw, 24px);
    animation: fadeIn 0.3s ease;
}

.server-detail__header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 18px;
}

.server-detail__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: cover;
    background-color: #2f3136;
    border: 2px solid var(--border-color);
}

.server-detail__name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.server-detail__id {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: monospace;
    opacity: 0.7;
}

.vc-connect-section, .vc-accounts-section {
    margin-bottom: 16px;
}

.vc-connect-title, .vc-accounts-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vc-input-row {
    position: relative;
}

.vc-input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    transition: all 0.2s ease;
}

.vc-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(255, 42, 42, 0.15);
}

.vc-accounts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.vc-accounts-header .vc-accounts-title {
    margin-bottom: 0;
}

.btn-select-all {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-main);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-select-all:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.05);
}

.vc-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
}

.vc-account-checkbox-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vc-account-checkbox-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.12);
}

.vc-account-checkbox-item.checked {
    background-color: rgba(255, 42, 42, 0.04);
    border-color: rgba(255, 42, 42, 0.2);
}

.vc-account-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vc-account-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.vc-account-name {
    font-size: 13px;
    font-weight: 600;
}

.vc-account-status {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

.vc-checkbox-wrapper {
    display: flex;
    align-items: center;
}

.vc-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 2px solid var(--border-color);
    appearance: none;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    background-color: rgba(0, 0, 0, 0.2);
}

.vc-checkbox:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

.vc-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ====== VC SESSIONS (Connected Accounts) ====== */
.vc-sessions-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.vc-sessions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.vc-sessions-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.vc-sessions-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.7;
}

.vc-sessions-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    background-color: rgba(255, 42, 42, 0.12);
    color: var(--accent-primary);
    border: 1px solid rgba(255, 42, 42, 0.2);
    transition: all 0.2s ease;
}

.vc-sessions-count.empty {
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.vc-sessions-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Empty state */
.vc-sessions-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px dashed var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.vc-sessions-empty svg {
    opacity: 0.35;
    flex-shrink: 0;
}

/* Individual session row */
.vc-session-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    background-color: rgba(255, 42, 42, 0.04);
    border: 1px solid rgba(255, 42, 42, 0.14);
    animation: fadeIn 0.25s ease;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.vc-session-item:hover {
    background-color: rgba(255, 42, 42, 0.07);
    border-color: rgba(255, 42, 42, 0.25);
}

.vc-session-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 42, 42, 0.3);
    object-fit: cover;
    background-color: #2f3136;
    flex-shrink: 0;
}

.vc-session-info {
    flex: 1;
    min-width: 0;
}

.vc-session-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vc-session-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-secondary);
}

.vc-session-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--accent-primary);
    box-shadow: 0 0 6px var(--accent-primary);
    animation: pulse 2s infinite ease-in-out;
    flex-shrink: 0;
}

.vc-session-channel {
    font-family: monospace;
    font-size: 10px;
    color: var(--text-secondary);
    opacity: 0.6;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

/* Session card action group — SS, soundboard, disconnect */
.vc-session-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

/* Per-account screenshare button — violet/purple ghost, fills on active/hover */
.btn-session-ss {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 7px;
    border: 1px solid rgba(176, 0, 255, 0.3);
    background-color: rgba(176, 0, 255, 0.07);
    color: #b000ff;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease,
                color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-session-ss:hover:not(:disabled) {
    background-color: #b000ff;
    border-color: #b000ff;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(176, 0, 255, 0.35);
}

/* Active state — account is currently streaming */
.btn-session-ss.active {
    background-color: rgba(176, 0, 255, 0.18);
    border-color: #b000ff;
    color: #b000ff;
    box-shadow: 0 0 8px rgba(176, 0, 255, 0.3);
}

.btn-session-ss.active:hover:not(:disabled) {
    background-color: rgba(255, 82, 82, 0.12);
    border-color: var(--accent-red);
    color: var(--accent-red);
    box-shadow: 0 3px 10px var(--accent-red-glow);
}

.btn-session-ss:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* "LIVE" badge shown in the session meta row when streaming */
.vc-session-live-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border-radius: 4px;
    background-color: #b000ff;
    color: #000;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    animation: pulse 2s infinite ease-in-out;
}

/* Screenshare All button — violet/purple accent to distinguish from green/red */
.btn-screenshare {
    background-color: rgba(176, 0, 255, 0.1);
    color: #b000ff;
    border: 1px solid rgba(176, 0, 255, 0.35);
    border-radius: var(--btn-radius);
    padding: 0 var(--btn-padding-x);
    height: var(--btn-height);
    font-size: var(--btn-font-size);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: var(--font-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed) ease;
}

.btn-screenshare:hover:not(:disabled) {
    background-color: #b000ff;
    color: #000;
    box-shadow: 0 5px 20px rgba(176, 0, 255, 0.35);
    transform: translateY(-2px);
}

.btn-screenshare:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Soundboard All button — purple accent */
.btn-soundboard {
    background-color: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: var(--btn-radius);
    padding: 0 var(--btn-padding-x);
    height: var(--btn-height);
    font-size: var(--btn-font-size);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: var(--font-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition-speed) ease;
}

.btn-soundboard:hover:not(:disabled) {
    background-color: #a855f7;
    color: #000;
    box-shadow: 0 5px 20px rgba(168, 85, 247, 0.35);
    transform: translateY(-2px);
}

.btn-soundboard:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Per-account soundboard button in session card */
.btn-session-sb {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 5px 11px;
    border-radius: 7px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background-color: rgba(168, 85, 247, 0.08);
    color: #c084fc;
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-session-sb:hover:not(:disabled) {
    background-color: #a855f7;
    border-color: #a855f7;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(168, 85, 247, 0.35);
}

.btn-session-sb:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Per-account disconnect button inside a session card */
.btn-session-disconnect {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
    padding: 5px 11px;
    border-radius: 7px;
    border: 1px solid rgba(255, 82, 82, 0.3);
    background-color: rgba(255, 82, 82, 0.08);
    color: var(--accent-red);
    font-family: var(--font-main);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.btn-session-disconnect:hover:not(:disabled) {
    background-color: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px var(--accent-red-glow);
}

.btn-session-disconnect:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-session-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.btn-vc-sessions-more {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px dashed var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-family: var(--font-main);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-vc-sessions-more:hover:not(:disabled) {
    background: rgba(255, 42, 42, 0.08);
    color: var(--accent-primary);
    border-color: rgba(255, 42, 42, 0.25);
}

.btn-vc-sessions-more:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ====== VC ACTION BUTTONS ====== */
.vc-action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;       /* side-by-side on desktop */
    margin-top: 18px;
    align-items: stretch;
}

/* Both buttons share the same flex basis so they grow equally */
.vc-action-buttons .btn-primary,
.vc-action-buttons .btn-disconnect,
.vc-action-buttons .btn-screenshare,
.vc-action-buttons .btn-soundboard {
    flex: 1 1 0;             /* equal width, both can shrink */
    min-width: 0;
    max-width: 220px;
}

/* Button icon — driven by --btn-icon-size token, scales with media queries */
.btn-icon {
    width:  var(--btn-icon-size);
    height: var(--btn-icon-size);
    min-width:  var(--btn-icon-size);
    min-height: var(--btn-icon-size);
    flex-shrink: 0;
    display: block;
    stroke: currentColor;
    fill: none;
    vector-effect: non-scaling-stroke;
}

.vc-action-buttons .btn-primary .btn-icon,
.vc-action-buttons .btn-disconnect .btn-icon,
.vc-action-buttons .btn-screenshare .btn-icon,
.vc-action-buttons .btn-soundboard .btn-icon {
    opacity: 1;
}

.btn-disconnect .btn-icon {
    stroke-width: 2.25;
}

.btn-primary.btn-connect {
    background: linear-gradient(135deg, #ff2a2a, #800000);
    box-shadow: 0 4px 15px rgba(255, 42, 42, 0.2);
}

.btn-primary.btn-connect-all {
    background: linear-gradient(135deg, #ff6600, #ff2a2a);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.2);
}

.btn-disconnect {
    background-color: rgba(255, 82, 82, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(255, 82, 82, 0.35);
    border-radius: var(--btn-radius);
    padding: 0 var(--btn-padding-x);
    height: var(--btn-height);
    font-size: var(--btn-font-size);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    font-family: var(--font-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    /* no white-space: nowrap — let text wrap on very narrow screens */
    /* no flex-shrink: 0 — allow it to shrink inside flex row */
    transition: all var(--transition-speed) ease;
}

.btn-disconnect:hover {
    background-color: var(--accent-red);
    color: #fff;
    box-shadow: 0 5px 20px var(--accent-red-glow);
    transform: translateY(-2px);
}

/* ====== VC STATUS RESULTS — summary badge only ====== */
.vc-results-panel {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: fadeIn 0.3s ease;
}

.vc-results-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.vc-results-summary .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 7px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
}

.vc-results-summary .badge.green {
    background-color: rgba(255, 42, 42, 0.15);
    color: var(--accent-primary);
}

.vc-results-summary .badge.red {
    background-color: rgba(255, 82, 82, 0.15);
    color: var(--accent-red);
}

/* ====== MOBILE RESPONSIVE ====== */
@media (max-width: 768px) {
    /* Redefine button tokens for mobile — all var(--btn-*) consumers
       automatically pick up the smaller values without needing per-rule overrides */
    :root {
        --btn-height:     36px;
        --btn-padding-x:  14px;
        --btn-font-size:  12px;
        --btn-icon-size:  13px;
    }
    .dashboard-layout {
        flex-direction: column;
        padding: 10px;
        gap: 10px;
    }

    .dashboard-sidebar {
        width: 100%;
        position: static;
    }

    .sidebar-server-list {
        max-height: 160px;
    }

    .dashboard-content {
        padding: 10px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 16px;
    }

    .dashboard-header .btn-primary {
        width: 100%;
        max-width: 100%;
    }

    .account-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .account-item__actions {
        width: 100%;
    }

    .account-item__actions .btn-edit-profile,
    .account-item__actions .btn-remove {
        flex: 1;
    }

    .account-item__left {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .profile-edit-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header__actions {
        width: 100%;
    }

    .dashboard-header__actions .btn-primary,
    .dashboard-header__actions .btn-secondary {
        width: 100%;
    }

    .btn-remove {
        width: 100%;
    }

    .auth-modal__content {
        padding: 24px 16px;
        margin: 0 10px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-card__value {
        font-size: 1.6rem;
    }

    /* Action buttons: stack vertically, compact and equal on mobile.
       Height, font-size, and padding are driven by the :root token overrides above. */
    .vc-action-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        margin-top: 14px;
    }

    .vc-action-buttons .btn-primary,
    .vc-action-buttons .btn-disconnect,
    .vc-action-buttons .btn-screenshare,
    .vc-action-buttons .btn-soundboard {
        flex: none;       /* prevent flex-grow from stretching height */
        width: 100%;
        max-width: 100%;
        letter-spacing: 0.6px;
        gap: 6px;
    }

    .server-detail {
        padding: 14px;
    }

    .server-detail__header {
        gap: 10px;
        padding-bottom: 12px;
        margin-bottom: 14px;
    }

    .server-detail__name {
        font-size: 1.1rem;
    }

    .vc-sessions-section {
        margin-top: 18px;
        padding-top: 16px;
    }

    /* Session card: avatar + info on top row, actions full-width below */
    .vc-session-item {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
    }

    .vc-session-avatar {
        width: 40px;
        height: 40px;
    }

    .vc-session-info {
        flex: 1 1 calc(100% - 52px);
        min-width: 0;
    }

    .vc-session-meta {
        flex-wrap: wrap;
        row-gap: 4px;
    }

    .vc-session-actions {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        justify-content: stretch;
    }

    .btn-session-ss,
    .btn-session-sb,
    .btn-session-disconnect {
        width: 100%;
        min-width: 0;
        justify-content: center;
        padding: 8px 4px;
        font-size: 10px;
        letter-spacing: 0.25px;
        gap: 4px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .btn-session-ss svg,
    .btn-session-sb svg,
    .btn-session-disconnect svg {
        width: 12px;
        height: 12px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    /* Even tighter tokens for small phones */
    :root {
        --btn-height:     34px;
        --btn-padding-x:  12px;
        --btn-font-size:  11px;
        --btn-icon-size:  12px;
    }

    .dashboard-layout {
        padding: 8px;
    }

    .dashboard-sidebar {
        border-radius: 12px;
        padding: 10px;
    }

    .server-detail {
        border-radius: 12px;
        padding: 12px;
    }

    .vc-input {
        font-size: 16px; /* prevent iOS zoom */
    }

    .form-group input {
        font-size: 16px; /* prevent iOS zoom */
    }

    .vc-action-buttons .btn-primary,
    .vc-action-buttons .btn-disconnect {
        letter-spacing: 0.4px;
        gap: 5px;
    }

    /* Stack session actions vertically on narrow phones */
    .vc-session-actions {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .btn-session-ss,
    .btn-session-sb,
    .btn-session-disconnect {
        padding: 10px 12px;
        font-size: 11px;
        letter-spacing: 0.4px;
    }
}

/* Prevent horizontal overflow globally */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* ====== SOUNDBOARD PAGE ====== */
.soundboard-page {
    max-width: 900px;
    margin: 0 auto;
}

.soundboard-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}

.soundboard-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
}

.soundboard-empty svg {
    margin-bottom: 12px;
    opacity: 0.5;
    color: #a855f7;
}

.soundboard-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 18px;
}

.soundboard-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.soundboard-card__title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
}

.soundboard-card__actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.soundboard-card__sounds {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.soundboard-card__empty {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.soundboard-sound-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.soundboard-sound-name {
    font-weight: 600;
    flex: 1;
    min-width: 0;
}

.soundboard-sound-file {
    font-size: 12px;
    color: var(--text-secondary);
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-soundboard-mini {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid rgba(168, 85, 247, 0.35);
    background: rgba(168, 85, 247, 0.1);
    color: #c084fc;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    font-family: var(--font-main);
}

.btn-soundboard-mini:hover {
    background: #a855f7;
    color: #000;
}

.btn-soundboard-mini.danger {
    border-color: rgba(255, 82, 82, 0.35);
    background: rgba(255, 82, 82, 0.08);
    color: var(--accent-red);
}

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

/* Play modal */
.soundboard-play-modal {
    max-width: 520px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.soundboard-play-list {
    overflow-y: auto;
    max-height: 50vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-right: 4px;
}

.soundboard-play-board {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
}

.soundboard-play-board__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: rgba(168, 85, 247, 0.08);
    border-bottom: 1px solid var(--border-color);
}

.soundboard-play-board__name {
    font-weight: 700;
    font-size: 14px;
}

.btn-soundboard-play-all {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-main);
}

.btn-soundboard-play-all:hover {
    background: #a855f7;
    color: #000;
}

.soundboard-play-sounds {
    display: flex;
    flex-direction: column;
}

.soundboard-play-sound-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 12px 14px;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    font-family: var(--font-main);
    text-align: left;
    transition: background 0.15s ease;
}

.soundboard-play-sound-btn:last-child {
    border-bottom: none;
}

.soundboard-play-sound-btn:hover {
    background: rgba(168, 85, 247, 0.12);
}

.soundboard-play-sound-btn__name {
    font-weight: 600;
}

.soundboard-play-sound-btn__play {
    font-size: 12px;
    color: #c084fc;
    font-weight: 700;
}

.soundboard-play-empty {
    margin: 0;
    padding: 12px 14px;
    font-size: 13px;
    color: var(--text-secondary);
}

.soundboard-play-options {
    margin-bottom: 12px;
}

.soundboard-loop-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}

.soundboard-loop-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.soundboard-loop-slider {
    width: 44px;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    position: relative;
    transition: background 0.2s ease;
}

.soundboard-loop-slider::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.soundboard-loop-toggle input:checked + .soundboard-loop-slider {
    background: #a855f7;
}

.soundboard-loop-toggle input:checked + .soundboard-loop-slider::after {
    transform: translateX(20px);
}

.soundboard-hint {
    margin: -4px 0 12px;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.hidden {
    display: none !important;
}

/* ====== MUSIC PLAYER VIEW ====== */
.music-page {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 20px 24px;
    padding: 0;
    align-items: start;
}

.music-page .dashboard-header {
    grid-column: 1 / -1;
    margin-bottom: 0px;
}

.music-column-left {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.music-column-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (max-width: 1024px) {
    .music-page {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}

.music-search-section {
    margin-bottom: 4px;
}

.music-search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px 6px 6px 16px;
    gap: 12px;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.music-search-bar:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 16px rgba(255, 42, 42, 0.15);
    background: rgba(255, 255, 255, 0.04);
}

.music-search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.music-search-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 15px;
    outline: none;
}

.music-search-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.music-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--accent-primary);
    color: #000000;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-family: var(--font-main);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.music-search-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.music-search-btn:active {
    transform: translateY(0);
}

.music-results-section {
    margin-top: 24px;
}

.music-section-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.music-section-title svg {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.music-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 6px;
}

.music-results-list::-webkit-scrollbar {
    width: 6px;
}

.music-results-list::-webkit-scrollbar-track {
    background: transparent;
}

.music-results-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.music-results-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.16);
}

.music-track-card {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
    gap: 14px;
    transition: all 0.2s ease;
}

.music-track-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 42, 42, 0.25);
    transform: translateX(4px);
}

.music-track-card__art {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.music-track-card__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-track-card__art-placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.music-track-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.music-track-card__title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-track-card__author {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-track-card__duration {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    flex-shrink: 0;
}

.music-track-card__play-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 42, 42, 0.1);
    border: 1px solid rgba(255, 42, 42, 0.25);
    color: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.music-track-card__play-btn:hover {
    background: var(--accent-primary);
    color: #121415;
    border-color: var(--accent-primary);
    transform: scale(1.1);
    box-shadow: 0 0 10px var(--accent-glow);
}

.music-track-card__play-btn svg {
    margin-left: 2px;
}

.music-play-controls {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.music-play-controls__inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .music-play-controls__inputs {
        grid-template-columns: 1fr;
    }
}

.music-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.music-input-group label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
}

.music-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
}

.music-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 8px rgba(255, 42, 42, 0.15);
}

.music-accounts-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.music-accounts-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.music-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 120px;
    overflow-y: auto;
    padding-right: 6px;
}

.music-accounts-empty {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
    padding: 16px 8px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    line-height: 1.4;
    width: 100%;
}

.music-account-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.music-account-row:hover {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.15);
}

.music-account-row input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.music-account-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.music-account-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.music-account-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.music-account-status--online {
    background: var(--accent-primary);
    box-shadow: 0 0 6px var(--accent-primary);
}

.music-account-status--offline {
    background: var(--text-secondary);
}

.music-autoplay-row {
    margin-top: 4px;
}

.music-autoplay-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    user-select: none;
}

.music-autoplay-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.music-autoplay-toggle input:checked + .soundboard-loop-slider {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-glow);
}

.music-autoplay-toggle input:checked + .soundboard-loop-slider::after {
    transform: translateX(20px);
}

.music-now-playing-section {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.music-now-playing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.music-stop-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.25);
    color: var(--accent-red);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.music-stop-all-btn:hover {
    background: var(--accent-red);
    color: #121415;
    border-color: var(--accent-red);
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.35);
}

.music-now-playing-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 260px;
    overflow-y: auto;
    padding-right: 6px;
}

.music-now-playing-list::-webkit-scrollbar {
    width: 6px;
}

.music-now-playing-list::-webkit-scrollbar-track {
    background: transparent;
}

.music-now-playing-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}

.music-now-playing-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.16);
}

.music-now-playing-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: rgba(0, 0, 0, 0.15);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    gap: 10px;
}

.music-np-card {
    display: flex;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.music-np-card--playing {
    border-color: rgba(255, 42, 42, 0.25);
    background: rgba(255, 42, 42, 0.03);
}

.music-np-card__left {
    display: flex;
    gap: 14px;
    align-items: center;
}

.music-np-card__art {
    width: 54px;
    height: 54px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.music-np-card__art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-np-card__art-placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.music-np-card__pulse {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
    animation: pulse 1.5s infinite ease-in-out;
}

.music-np-card__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.music-np-card__track-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-np-card__track-author {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-np-card__account {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.music-np-card__account-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

.music-np-card__account span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.music-np-card__right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.music-np-card__progress {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.music-np-card__progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.music-np-card__progress-fill {
    height: 100%;
    background: var(--accent-primary);
    border-radius: 2px;
    transition: width 0.3s linear;
}

.music-np-card__times {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    font-family: monospace;
}

.music-np-card__controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.music-np-autoplay-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}

.music-np-autoplay-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.music-np-autoplay-toggle input:checked + .soundboard-loop-slider {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-glow);
}

.music-np-autoplay-toggle input:checked + .soundboard-loop-slider::after {
    transform: translateX(20px);
}

.music-np-autoplay-label {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.music-np-stop-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.25);
    color: var(--accent-red);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.music-np-stop-btn:hover {
    background: var(--accent-red);
    color: #121415;
    border-color: var(--accent-red);
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.35);
}