/* Guild Dashboard - Figma Design Implementation */

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

body {
    font-family: 'Poppins', sans-serif;
    background: #1A1A1A;
    color: var(--text-primary);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
    height: auto;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-container {
    display: flex;
    flex: 1;
    max-width: none;
    margin: 0;
    margin-top: 56px;
    width: 100%;
    overflow: visible;
    min-height: calc(100vh - 56px);
}

/* ============================================
   GUILD SELECTOR SIDEBAR (Far Left)
   ============================================ */

.guild-selector-sidebar {
    width: 72px;
    min-width: 72px;
    max-width: 72px;
    background: #1A1A1A;
    /*border-right: 1px solid var(--border-light);*/
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    height: calc(100vh - 56px);
    padding: 16px 0;
    position: fixed;
    left: 0;
    top: 56px;
    z-index: 90;
}

/* Guild selector user avatar */
.guild-selector-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    background-size: cover;
    background-position: center;
    margin: 0 auto 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    color: white;
}

.guild-selector-user-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--primary-color);
}

.guild-selector-divider {
    width: 32px;
    height: 2px;
    background: var(--border-light);
    margin: 0 auto 24px;
}

.guild-icon-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.guild-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    flex-shrink: 0;
}

.guild-icon:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.guild-icon:not(.active) {
    opacity: 0.6;
}

/* Active indicator - LEFT side */
.guild-icon.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 0 2px 2px 0;
}

/* ============================================
   NAVIGATION SIDEBAR
   ============================================ */

.navigation-sidebar {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    background: var(--bg-primary);
    /*border-right: 1px solid var(--border-light);*/
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    flex-shrink: 0;
    height: calc(100vh - 56px);
    position: fixed;
    left: 72px;
    top: 56px;
    z-index: 90;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
    max-width: 280px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item.nav-link-external {
    text-decoration: none;
    color: inherit;
}

.nav-item:hover {
    background: var(--bg-overlay);
}

.nav-item.active {
    background: var(--bg-overlay-hover);
}

.nav-dot {
    width: 8px;
    height: 8px;
    background: #666666;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Navigation Icons */
.nav-icon {
    width: 16px;
    height: 16px;
    margin-right: 12px;
    flex-shrink: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Dashboard Icon */
.nav-icon-dashboard {
    background-image: url('/images/acosmibot_dashboard-inactive.svg');
}

.nav-item.active .nav-icon-dashboard {
    background-image: url('/images/acosmibot_dashboard-active.svg');
}

/* Moderation Icon */
.nav-icon-moderation {
    background-image: url('/images/acosmibot_moderation-inactive.svg');
}

.nav-item.active .nav-icon-moderation {
    background-image: url('/images/acosmibot_moderation-active.svg');
}

/* Welcomes and Goodbyes Icon */
.nav-icon-welcomes {
    background-image: url('/images/acosmibot_welcomesgoodbyes-inactive.svg');
}

.nav-item.active .nav-icon-welcomes {
    background-image: url('/images/acosmibot_welcomesgoodbyes-active.svg');
}

/* Overview Icon */
.nav-icon-overview {
    background-image: url('/images/acosmibot_overview-inactive.svg');
}

.nav-item.active .nav-icon-overview {
    background-image: url('/images/acosmibot_overview-active.svg');
}

/* Custom Commands Icon */
.nav-icon-customcommands {
    background-image: url('/images/acosmibot_customcommands-inactive.svg');
}

.nav-item.active .nav-icon-customcommands {
    background-image: url('/images/acosmibot_customcommands-active.svg');
}

/* Lottery Icon */
.nav-icon-lottery {
    background-image: url('/images/acosmibot_lottery-inactive.svg');
}

.nav-item.active .nav-icon-lottery {
    background-image: url('/images/acosmibot_lottery-active.svg');
}

/* Polymorph Icon */
.nav-icon-polymorph {
    background-image: url('/images/acosmibot_polymorph-inactive.svg');
}

.nav-item.active .nav-icon-polymorph {
    background-image: url('/images/acosmibot_polymorph-active.svg');
}

/* Reputation Icon */
.nav-icon-reputation {
    background-image: url('/images/acosmibot_reputation-inactive.svg');
}

.nav-item.active .nav-icon-reputation {
    background-image: url('/images/acosmibot_reputation-active.svg');
}

/* Leveling Icon */
.nav-icon-leveling {
    background-image: url('/images/acosmibot_leveling-inactive.svg');
}

.nav-item.active .nav-icon-leveling {
    background-image: url('/images/acosmibot_leveling-active.svg');
}

/* Membership Icon */
.nav-icon-membership {
    background-image: url('/images/acosmibot_membership-inactive.svg');
}

.nav-item.active .nav-icon-membership {
    background-image: url('/images/acosmibot_membership-active.svg');
}

/* Embeds Icon */
.nav-icon-embeds {
    background-image: url('/images/acosmibot_embeds-inactive.svg');
}

.nav-item.active .nav-icon-embeds {
    background-image: url('/images/acosmibot_embeds-active.svg');
}

/* Reaction Roles Icon */
.nav-icon-reactionroles {
    background-image: url('/images/acosmibot_reactionroles-inactive.svg');
}

.nav-item.active .nav-icon-reactionroles {
    background-image: url('/images/acosmibot_reactionroles-active.svg');
}

/* Activity Monitor Icon */
.nav-icon-activitymonitor {
    background-image: url('/images/acosmibot_activitymonitor-inactive.svg');
}

.nav-item.active .nav-icon-activitymonitor {
    background-image: url('/images/acosmibot_activitymonitor-active.svg');
}

/* Jail Icon */
.nav-icon-jail {
    background-image: url('/images/acosmibot_jail-inactive.svg');
}

.nav-item.active .nav-icon-jail {
    background-image: url('/images/acosmibot_jail-active.svg');
}

/* Portals Icon */
.nav-icon-portals {
    background-image: url('/images/acosmibot_portal-inactive.svg');
}

.nav-item.active .nav-icon-portals {
    background-image: url('/images/acosmibot_portal-active.svg');
}

/* Slots Icon */
.nav-icon-slots {
    background-image: url('/images/acosmibot_slots-inactive.svg');
}

.nav-item.active .nav-icon-slots {
    background-image: url('/images/acosmibot_slots-active.svg');
}

/* Twitch Icon */
.nav-icon-twitch {
    background-image: url('/images/acosmibot_twitch-inactive.svg');
}

.nav-item.active .nav-icon-twitch {
    background-image: url('/images/acosmibot_twitch-active.svg');
}

/* YouTube Icon */
.nav-icon-youtube {
    background-image: url('/images/acosmibot_youtube-inactive.svg');
}

.nav-item.active .nav-icon-youtube {
    background-image: url('/images/acosmibot_youtube-active.svg');
}

/* Kick Icon */
.nav-icon-kick {
    background-image: url('/images/acosmibot_kick-inactive.svg');
}

.nav-item.active .nav-icon-kick {
    background-image: url('/images/acosmibot_kick-active.svg');
}

/* Reddit Icon */
.nav-icon-reddit {
    background-image: url('/images/acosmibot_reddit-inactive.svg');
}

.nav-item.active .nav-icon-reddit {
    background-image: url('/images/acosmibot_reddit-active.svg');
}

/* Premium Icon */
.nav-icon-premium {
    background-image: url('/images/acosmibot_premium-inactive.svg');
}

.nav-item.active .nav-icon-premium {
    background-image: url('/images/acosmibot_premium-active.svg');
}

/* Logout Icon */
.nav-icon-logout {
    background-image: url('/images/acosmibot_logout-inactive.svg');
}

.nav-item.active .nav-icon-logout {
    background-image: url('/images/acosmibot_logout-active.svg');
}

/* Leaderboards Icon */
.nav-icon-leaderboards {
    background-image: url('/images/acosmibot_leaderboards-inactive.svg');
}

.nav-item.active .nav-icon-leaderboards {
    background-image: url('/images/acosmibot_leaderboards-active.svg');
}

.nav-text {
    font-size: 14px;
    color: var(--text-secondary);
    flex: 1;
}

.nav-item.active .nav-text {
    color: var(--text-primary);
}

.nav-indicator {
    width: 16px;
    height: 16px;
    margin-left: auto;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.2s ease;
    display: none;
}

.nav-indicator.active {
    display: block;
    background-image: url('/images/acosmibot_toggled.svg');
}

/* Section Headers */
.nav-section {
    margin-top: 16px;
}

.nav-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    cursor: pointer;
    color: var(--primary-color);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.collapse-arrow {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.nav-section.collapsed .collapse-arrow {
    transform: rotate(-90deg);
}

/* Subsections */
.nav-subsection {
    margin: 8px 0;
}

.nav-subsection-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    letter-spacing: 0.5px;
    padding: 8px 20px 4px;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.main-content {
    flex: 1;
    padding: 40px;
    overflow-y: visible;
    overflow-x: visible;
    position: relative;
    background: #252525;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 352px;
    width: calc(100% - 352px);
    min-height: calc(100vh - 56px);
}

#view-container {
    max-width: 1000px;
    width: 100%;
}

.view-loading {
    position: relative;
    min-height: 400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   TOP NAVIGATION BAR
   ============================================ */

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 56px;
    background: #1A1A1A;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100px;
}

.top-nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.top-nav-logo img {
    height: 28px;
    width: auto;
}

.top-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100px;
    justify-content: flex-end;
}

.notification-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background-image: url('/images/acosmibot_notifications-none.svg');
    background-size: 20px 20px;
    background-repeat: no-repeat;
    background-position: center;
}

.notification-btn.hasNotifications {
    background-image: url('/images/acosmibot_notifications.svg');
}

.notification-btn:hover {
    background-color: var(--bg-overlay);
}

.user-avatar-nav {
    width: 44px;
    height: 44px;
    background: var(--bg-card);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    background-size: cover;
    background-position: center;
}

.user-avatar-nav:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* User Menu Dropdown */
.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background: var(--bg-overlay);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 10px;
    min-width: 200px;
    z-index: 1001;
}

.user-menu .user-info {
    padding: 10px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 8px;
}

.user-menu .user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.user-menu .user-stats {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.user-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.user-menu a:hover {
    background: rgba(0, 0, 0, 0.2);
}

.user-menu .logout-btn {
    color: #ff6b6b;
}

/* ============================================
   STICKY DASHBOARD HEADER
   ============================================ */

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

/* Server Branding */
.server-branding {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.server-branding-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--bg-card);
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    color: white;
}

.server-branding-name {
    font-size: 19px;
    font-weight: 600;
    color: var(--text-primary);
}

.server-branding-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Tier Badge Styles */
.tier-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.tier-badge.premium-plus-ai {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(147, 51, 234, 0.2));
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #FFD700;
}

.tier-badge.premium {
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.4);
    color: #FFD700;
}

.tier-badge.free {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

/* Limit Display */
.limit-display {
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    font-weight: 500;
}

.header-left h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-left .feature-description {
    margin: 0;
    font-size: 16px;
    color: var(--text-secondary);
}

.save-btn {
    position: relative;
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.save-btn.has-changes {
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
    animation: pulse 2s infinite;
}

.save-btn:not(:disabled):hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

.unsaved-indicator {
    color: #FFD700;
    font-size: 16px;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 217, 255, 0.5); }
    50% { box-shadow: 0 0 30px rgba(0, 217, 255, 0.8); }
}

/* ============================================
   FEATURE CONTENT
   ============================================ */

.feature-header-container {
    max-width: 1000px;
    width: 100%;
    margin-bottom: 40px;
    padding-right: 120px;
}

.feature-container {
    max-width: 1000px;
    width: 100%;
    padding-right: 120px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.feature-description {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 60px;
    height: 32px;
    cursor: pointer;
}

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

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #555555;
    border-radius: 34px;
    transition: 0.3s;
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 24px;
    width: 24px;
    left: 4px;
    bottom: 4px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(28px);
}

/* Form Sections - No background, minimal padding */
.form-section {
    margin-bottom: 24px;
}

.form-section h3 {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 12px;
}

/* Inline sections - side by side */
.form-section-inline {
    display: flex;
    gap: 20px;
}

.form-section-inline .inline-field {
    flex: 1;
}

/* Stream Input Group */
.stream-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-left: -8px;
    margin-right: -8px;
}

.stream-input-group:hover {
    background: rgba(0, 217, 255, 0.05);
}

.stream-input-group.selected {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--primary-color);
    margin-bottom: 12px;
}

.stream-input {
    flex: 1;
    background: #1F1F1F;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
}

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

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

/* Validation Checkbox Indicator */
.validation-indicator {
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 8px;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: default;
}

.validation-indicator.valid {
    display: flex;
    background: rgba(0, 255, 136, 0.2);
    color: #00FF88;
    font-size: 24px;
}

.validation-indicator.invalid {
    display: flex;
    background: rgba(255, 68, 68, 0.2);
    color: #FF4444;
    font-size: 24px;
}

.validation-indicator.validating {
    display: flex;
    background: rgba(0, 217, 255, 0.2);
    color: var(--primary-color);
    animation: pulse-validation 1.5s infinite;
}

@keyframes pulse-validation {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Edit Button */
.edit-btn {
    width: 48px;
    height: 48px;
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid var(--border-cyan);
    border-radius: 8px;
    color: var(--primary-color);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn:hover {
    background: rgba(0, 217, 255, 0.3);
    transform: scale(1.05);
}

/* Delete Button */
.delete-btn {
    width: 48px;
    height: 48px;
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid rgba(255, 68, 68, 0.3);
    border-radius: 8px;
    color: #FF4444;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-btn:hover {
    background: rgba(255, 68, 68, 0.3);
    transform: scale(1.05);
}

/* Select Dropdowns */
.feature-select {
    width: 100%;
    background: #1F1F1F;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 14px 16px;
    color: var(--text-secondary);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    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 1.5L6 6.5L11 1.5' stroke='%23B0B0B0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 48px;
}

.feature-select:hover {
    border-color: var(--border-cyan);
}

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

/* Custom scrollbar for multi-select dropdowns */
.feature-select::-webkit-scrollbar {
    width: 8px;
}

.feature-select::-webkit-scrollbar-track {
    background: #151515;
    border-radius: 4px;
}

.feature-select::-webkit-scrollbar-thumb {
    background: var(--border-cyan);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.feature-select::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Firefox scrollbar styling */
.feature-select {
    scrollbar-width: thin;
    scrollbar-color: var(--border-cyan) #151515;
}

/* Old inline styles removed - using form-section-inline instead */

/* Selected Streamer Indicator */
.selected-streamer-indicator {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.selected-streamer-indicator strong {
    color: var(--primary-color);
    font-weight: 600;
}

.btn-clear-indicator {
    background: transparent;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-clear-indicator:hover {
    background: var(--primary-color);
    color: white;
}

.field-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    margin-bottom: 0;
}

/* Event Toggle Rows - Moderation Feature */
.event-toggles-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

.event-toggle-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.event-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
}

.event-toggle label {
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.event-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.event-channel-select {
    flex: 1;
    max-width: 300px;
    background: #1F1F1F;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-secondary);
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    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 1.5L6 6.5L11 1.5' stroke='%23B0B0B0' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.event-channel-select:hover {
    border-color: var(--border-cyan);
}

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

/* Message Textarea */
.message-textarea {
    width: 100%;
    background: #1F1F1F;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    resize: vertical;
    transition: all 0.3s ease;
    line-height: 1.6;
}

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

.message-textarea:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #151515;
    color: var(--text-muted);
}

/* Variable Tags */
.variable-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.var-tag {
    background: var(--bg-overlay);
    border: 1px solid var(--border-cyan);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    font-weight: 500;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-circle {
    width: 180px;
    height: 180px;
    background: #D9D9D9;
    border-radius: 50%;
    margin-bottom: 24px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* ============================================
   STREAMER CARDS & LIST
   ============================================ */

.streamers-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.streamer-card {
    background: #1F1F1F;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.3s ease;
}

.streamer-card:hover {
    border-color: var(--primary-color);
    background: #252525;
}

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

.streamer-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.platform-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #9146FF;
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.streamer-details {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.streamer-details div {
    margin-bottom: 4px;
}

.streamer-actions {
    display: flex;
    gap: 8px;
}

.streamer-actions button {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

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

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary-color);
}

.btn-danger {
    background: rgba(255, 68, 68, 0.2);
    color: #FF4444;
    border: 1px solid rgba(255, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(255, 68, 68, 0.3);
}

.btn-add-streamer {
    width: 48px;
    height: 48px;
    background: #555555;
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

.btn-add-streamer:hover:not(:disabled) {
    background: #666666;
    transform: translateY(-2px);
}

.btn-add-streamer:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .navigation-sidebar {
        width: 240px;
        min-width: 240px;
        max-width: 240px;
    }

    .main-content {
        padding: 30px;
        margin-left: 312px;
        width: calc(100% - 312px);
    }

    .feature-container {
        padding-right: 80px;
    }

    .feature-header-container {
        padding-right: 80px;
    }
}

@media (max-width: 768px) {
    .guild-selector-sidebar {
        position: fixed;
        left: 0;
        top: 56px;
        bottom: 0;
        z-index: 1001;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

    .navigation-sidebar {
        position: fixed;
        left: 72px;
        top: 56px;
        bottom: 0;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

    body {
        align-items: stretch;
    }

    .dashboard-container {
        max-width: none;
        width: 100%;
    }

    .main-content {
        padding: 20px;
        margin-left: 0;
        width: 100%;
    }

    .top-nav {
        padding: 0 16px;
        height: 48px;
    }

    .top-nav-left,
    .top-nav-right {
        width: 60px;
    }

    .feature-container {
        padding-right: 0;
    }

    .feature-header-container {
        padding-right: 0;
    }

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

    .feature-header-controls {
        flex-direction: column-reverse;
        gap: 12px;
        align-items: flex-end;
    }

    .save-btn {
        width: 100%;
    }

    .stream-input-group {
        flex-wrap: wrap;
    }

    .feature-select {
        width: 100%;
    }

    .inline-field {
        width: 100%;
    }
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
body::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

.sidebar::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover {
    background: var(--bg-card);
}
/* ============================================
   COMING SOON MODAL
   ============================================ */

.coming-soon-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--bg-primary);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalFadeIn 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
    line-height: 1;
}

.modal-content h2 {
    color: var(--text-primary);
    margin-bottom: 16px;
    font-size: 1.8rem;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.6;
}

.modal-close-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 16px 24px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 500px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-success {
    border-left-color: #4CAF50;
}

.toast-error {
    border-left-color: #dc3545;
}

.toast-info {
    border-left-color: var(--primary-color);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-top: 24px;
    font-weight: 500;
}

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

/* ============================================
   CONFIRM DIALOG
   ============================================ */

.confirm-dialog-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
}

.confirm-dialog-modal .modal-content {
    max-width: 450px;
}

.confirm-dialog-modal h2 {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.confirm-dialog-modal p {
    font-size: 1rem;
    margin-bottom: 24px;
}

.dialog-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.dialog-buttons button {
    flex: 1;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

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

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
}

/* ============================================
   NAVIGATION SECTION COLLAPSE
   ============================================ */

.nav-section.collapsed .nav-subsection {
    display: none;
}

.nav-section.collapsed .nav-item:not(.nav-section-header) {
    display: none;
}

.nav-section.collapsed .collapse-arrow {
    transform: rotate(-90deg);
}

.collapse-arrow {
    transition: transform 0.2s ease;
}

/* ============================================
   NOTIFICATION SYSTEM
   ============================================ */

.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.notification {
    background: #1F1F1F;
    border-left: 4px solid;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    min-width: 300px;
    max-width: 400px;
    pointer-events: all;
    transform: translateX(120%);
    opacity: 0;
    transition: all 0.3s ease;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.notification-error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.notification-info {
    border-left-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1) 0%, rgba(0, 217, 255, 0.05) 100%);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .notification-container {
        top: 60px;
        right: 10px;
        left: 10px;
    }

    .notification {
        min-width: auto;
        max-width: 100%;
    }
}

/* ===== AI FEATURE STYLES ===== */

/* Channel Checkbox Container */
.channel-checkbox-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
    border-radius: 8px;
}

.channel-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.channel-checkbox-item:hover {
    background: rgba(0, 217, 255, 0.05);
}

.channel-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.radio-option:hover {
    background: rgba(0, 217, 255, 0.05);
    border-color: var(--primary-color);
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Character Count */
.character-count {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.character-count.warning {
    color: #FFB800;
}

.character-count.danger {
    color: #FF4444;
}

/* Upgrade Banner */
.upgrade-banner {
    background: linear-gradient(135deg, rgba(0, 217, 255, 0.1), rgba(147, 51, 234, 0.1));
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
}

.upgrade-banner h2 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.upgrade-banner p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.btn-upgrade {
    display: inline-block;
    padding: 12px 32px;
    background: var(--primary-color);
    color: #1A1A1A;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-upgrade:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 217, 255, 0.3);
}

/* Premium Badge */
.premium-badge {
    margin-left: auto;
    font-size: 12px;
    padding: 2px 6px;
    background: rgba(255, 215, 0, 0.2);
    border-radius: 4px;
    color: #FFD700;
}

/* Nav Icon for AI */
.nav-icon-ai {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%2300D9FF"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-5-9h2v2H7v-2zm4 0h2v2h-2v-2zm4 0h2v2h-2v-2z"/></svg>') center/contain no-repeat;
}

/* ============================================
   DOCS AND DASHBOARD PAGE SIDEBAR ADJUSTMENTS
   ============================================ */

/* Adjust sidebar heights to stop exactly at footer top (56px nav + footer height) */
.docs-page .guild-selector-sidebar,
.dashboard-page .guild-selector-sidebar,
.docs-page .navigation-sidebar,
.dashboard-page .navigation-sidebar,
.docs-page .docs-navigation-sidebar {
    height: calc(100vh - 56px - 100px) !important;
    border-bottom: none !important;
    border-right: none !important;
    border-top: none !important;
}

/* Remove border-bottom from specific nav elements in sidebars only (overrides base.css .nav) */
.guild-selector-sidebar .sidebar-nav,
.navigation-sidebar .sidebar-nav,
.docs-navigation-sidebar .sidebar-nav {
    border-bottom: none !important;
}
