/* ============================================
   Vibbly Dashboard Styles
   Dark Mode with Cyan Accents
   ============================================ */

:root {
    --primary: #06B6D4;
    --primary-dark: #0891B2;
    --primary-light: #22D3EE;
    --background: #0D1117;
    --surface: #161B22;
    --surface-hover: #1F2937;
    --text: #E5E7EB;
    --text-muted: #9CA3AF;
    --border: #30363D;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    
    --sidebar-width: 280px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}

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

.brand-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    color: var(--text);
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    font-weight: 500;
    position: relative;
}

.nav-item:hover {
    background: var(--surface-hover);
    color: var(--primary);
}

.nav-item.active {
    background: rgba(6, 182, 212, 0.1);
    color: var(--primary);
}

.badge-pro {
    margin-left: auto;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
    background: var(--warning);
    color: white;
    border-radius: 4px;
    font-weight: 700;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.user-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.user-tier {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.page-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
}

.header-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
}

.page-content {
    flex: 1;
    padding: 2rem;
    max-width: 1400px;
    width: 100%;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn-block {
    width: 100%;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #DC2626;
}

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

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

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

.card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

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

/* Grid */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Stats Cards */
.stat-card {
    background: linear-gradient(135deg, var(--surface) 0%, rgba(6, 182, 212, 0.02) 100%);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #0891B2, var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(6, 182, 212, 0.15);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #0891B2 100%);
    border-radius: 14px;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--text) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.table th {
    text-align: left;
    padding: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.table tr:hover {
    background: var(--surface-hover);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

.form-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: 0.3s;
    border-radius: 24px;
}

.form-switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

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

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

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 17, 23, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.notification {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    min-width: 300px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    border-left: 4px solid var(--success);
}

.notification-error {
    border-left: 4px solid var(--danger);
}

.notification-warning {
    border-left: 4px solid var(--warning);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: rgba(6, 182, 212, 0.2);
    color: var(--primary-light);
}

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

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

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

.empty-state svg {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text);
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.hidden { display: none !important; }

/* Responsive */
/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
    color: var(--text);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-menu-toggle:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Mobile Backdrop */
.mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-backdrop.active {
    display: block;
    opacity: 1;
}

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .main-content {
        margin-left: 0;
        padding-top: 4rem;
        width: 100%;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .page-header {
        padding-top: 1rem;
    }
    
    .nav-item {
        padding: 1rem 1.25rem;
        font-size: 0.9rem;
    }
    
    .nav-item svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .page-header {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        width: 100%;
    }
    
    .header-content h1 {
        font-size: 1.5rem;
    }
    
    .header-actions {
        flex-direction: row;
        width: 100%;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .header-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.625rem 1rem;
    }
    
    .card {
        margin-bottom: 1rem;
        padding: 1.25rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .card-actions {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
        flex-wrap: wrap;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px;
        padding: 0.75rem;
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1rem 0;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
    
    .notification-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .notification {
        min-width: auto;
        width: 100%;
    }
    
    .stat-card {
        padding: 1.25rem;
    }
    
    .stat-value {
        font-size: 1.75rem;
    }
    
    .table {
        min-width: 100%;
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    .table th {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle {
        top: 0.75rem;
        left: 0.75rem;
        padding: 0.625rem;
    }
    
    .mobile-menu-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    .sidebar {
        width: 85%;
        max-width: 320px;
    }
    
    .main-content {
        padding-top: 3.5rem;
    }
    
    .page-content {
        padding: 0.75rem;
    }
    
    .page-header {
        padding: 0.75rem;
    }
    
    .header-content h1 {
        font-size: 1.25rem;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .header-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .card {
        margin-bottom: 0.75rem;
        padding: 1rem;
    }
    
    .card-header h3 {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.625rem 0.875rem;
    }
    
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px;
        padding: 0.625rem;
    }
    
    .modal {
        padding: 0.75rem;
        margin: 0.5rem;
        max-height: calc(100vh - 1rem);
    }
    
    .modal-header h2 {
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 0.75rem 0;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 48px;
        height: 48px;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .notification-container {
        top: 0.75rem;
        right: 0.75rem;
        left: 0.75rem;
    }
}

/* ============================================
   Tab Selector Styles
   ============================================ */

.tab-selector {
    display: flex;
    background: var(--surface);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid var(--border);
    margin-bottom: 2rem;
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

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

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.tab-icon {
    font-size: 1rem;
}

/* ============================================
   Guild Grid Styles
   ============================================ */

.tab-content {
    display: none;
}

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

.guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.guild-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.guild-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.guild-card.linked {
    border-left: 4px solid var(--success);
}

.guild-card.available {
    border-left: 4px solid var(--primary);
}

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

.guild-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

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

.guild-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

.guild-status {
    display: flex;
    align-items: center;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.inactive {
    background: rgba(107, 114, 128, 0.2);
    color: var(--text-muted);
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.guild-info {
    margin-bottom: 1.5rem;
}

.guild-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.guild-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.guild-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.guild-actions .btn {
    flex: 1;
    justify-content: center;
}

/* ============================================
   Empty State Styles
   ============================================ */

.empty-state-large {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 12px;
    margin: 2rem 0;
}

.empty-state-large .empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

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

.empty-state-large p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
    .guild-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .guild-card {
        padding: 1rem;
    }
    
    .guild-avatar {
        width: 48px;
        height: 48px;
    }
    
    .guild-name {
        font-size: 1.125rem;
    }
    
    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .tab-icon {
        font-size: 0.875rem;
    }
}

/* ============================================
   Custom Confirmation Modal
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.confirmation-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal-overlay.show .confirmation-modal {
    transform: scale(1);
}

.confirmation-modal .modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.confirmation-modal .modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.confirmation-modal .modal-icon.warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.confirmation-modal .modal-icon.danger {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.confirmation-modal .modal-icon.info {
    background: rgba(6, 182, 212, 0.2);
    color: var(--primary);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.confirmation-modal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.confirmation-modal .modal-body {
    margin-bottom: 2rem;
}

.confirmation-modal .modal-message {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.confirmation-modal .modal-list {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.confirmation-modal .modal-list ol {
    margin: 0;
    padding-left: 1.5rem;
    color: var(--text);
}

.confirmation-modal .modal-list li {
    margin-bottom: 0.5rem;
}

.confirmation-modal .modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.confirmation-modal .btn-modal {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.confirmation-modal .btn-modal-secondary {
    background: var(--surface-hover);
    color: var(--text);
    border: 1px solid var(--border);
}

.confirmation-modal .btn-modal-secondary:hover {
    background: var(--border);
}

.confirmation-modal .btn-modal-primary {
    background: var(--primary);
    color: white;
}

.confirmation-modal .btn-modal-primary:hover {
    background: var(--primary-dark);
}

.confirmation-modal .btn-modal-danger {
    background: var(--danger);
    color: white;
}

.confirmation-modal .btn-modal-danger:hover {
    background: #DC2626;
}

/* ============================================
   Branding Section Styles
   ============================================ */

.branding-container {
    position: relative;
}

.branding-container.pro-locked {
    filter: grayscale(0.3);
    opacity: 0.7;
}

.pro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}

.pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.pro-overlay h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.pro-overlay p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    text-align: center;
}

.branding-options {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.branding-options .card {
    position: relative;
}

.pro-indicator {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.avatar-upload {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-preview {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-hover);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-preview:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

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

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-preview:hover .avatar-overlay {
    opacity: 1;
}

.color-picker-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.color-picker {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
    padding: 0;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
    width: 100%;
    height: 100%;
}

.color-picker:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-control:disabled {
    background: var(--surface-hover);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-control:disabled::placeholder {
    color: var(--text-muted);
    opacity: 0.5;
}

textarea.form-control:disabled {
    resize: none;
    background: var(--surface-hover);
    color: var(--text-muted);
    opacity: 0.6;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.card-subtitle {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title svg {
    color: var(--primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .avatar-upload {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .color-picker-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .pro-overlay {
        padding: 1rem;
        text-align: center;
    }
    
    .pro-overlay h3 {
        font-size: 1.25rem;
    }
}

/* ============================================
   Card Actions and Command Editing
   ============================================ */

.card-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.card-actions .btn svg {
    width: 16px;
    height: 16px;
}

/* Role Selector Styles */
.role-selector {
    margin-top: 0.5rem;
}

.role-dropdown-container {
    position: relative;
}

.role-dropdown-container select[multiple] {
    min-height: 120px;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.875rem;
    line-height: 1.5;
}

.role-dropdown-container select[multiple]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.role-dropdown-container option {
    padding: 0.5rem;
    background: var(--surface);
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.role-dropdown-container option:checked {
    background: var(--primary);
    color: white;
}

.role-dropdown-container option:hover {
    background: var(--surface-hover);
}

/* Enhanced Form Controls for Command Editing */
.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input[readonly] {
    background: var(--surface-hover);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-group .form-text {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Command Card Enhancements */
.card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card .card-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

/* Badge Styles for Command Categories */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-secondary {
    background: var(--surface-hover);
    color: var(--text-muted);
}

/* Modern Command Edit Modal Styles */
.command-edit-modal.modern {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    max-width: 1200px;
    width: 95%;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
}

.command-edit-modal.modern .modal-header {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 32px 32px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--surface) 0%, rgba(6, 182, 212, 0.05) 100%);
    border-radius: 20px 20px 0 0;
}

.command-edit-modal.modern .modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.2);
}

.command-edit-modal.modern .modal-icon.command-ban {
    background: #EF4444;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.2);
}

.command-edit-modal.modern .modal-icon.command-kick {
    background: #F59E0B;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.2);
}

.command-edit-modal.modern .modal-icon.command-mute {
    background: #6B7280;
    box-shadow: 0 8px 24px rgba(107, 114, 128, 0.2);
}

.command-edit-modal.modern .modal-title-section {
    flex: 1;
}

.command-edit-modal.modern .modal-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.command-edit-modal.modern .modal-description {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.command-edit-modal.modern .modal-body {
    padding: 40px;
}

.command-edit-modal.modern .settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.command-edit-modal.modern .setting-card {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
}

.command-edit-modal.modern .setting-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.command-edit-modal.modern .setting-card.full-width {
    grid-column: 1 / -1;
}

.command-edit-modal.modern .setting-header {
    margin-bottom: 20px;
}

.command-edit-modal.modern .setting-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 6px 0;
}

.command-edit-modal.modern .setting-subtitle {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

.command-edit-modal.modern .setting-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
    display: block;
}

.form-control-readonly {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
}

.custom-message-container {
    position: relative;
}

.custom-message-container .pro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    padding: 1.5rem;
    text-align: center;
}

.custom-message-container .pro-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.custom-message-container .pro-overlay h4 {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.custom-message-container .pro-overlay p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.pro-indicator {
    display: inline-block;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.command-edit-modal .form-group.pro-locked textarea:disabled {
    background: var(--surface-hover);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Role Checkboxes */
.command-edit-modal.modern .role-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
}

.command-edit-modal.modern .role-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.command-edit-modal.modern .role-checkbox:hover {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.05);
}

.command-edit-modal.modern .role-checkbox.checked {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
}

.command-edit-modal.modern .role-checkbox input[type="checkbox"] {
    display: none;
}

.command-edit-modal.modern .checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.command-edit-modal.modern .role-checkbox.checked .checkbox-custom {
    background: var(--primary);
    border-color: var(--primary);
}

.command-edit-modal.modern .role-checkbox.checked .checkbox-custom::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.command-edit-modal.modern .role-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

/* Cooldown Input */
.command-edit-modal.modern .cooldown-input {
    display: flex;
    align-items: center;
    gap: 12px;
}

.command-edit-modal.modern .modern-input {
    flex: 1;
    padding: 14px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.command-edit-modal.modern .modern-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.command-edit-modal.modern .input-suffix {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

/* Message Input */
.command-edit-modal.modern .message-input {
    position: relative;
}

.command-edit-modal.modern .modern-textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.2s ease;
    font-family: inherit;
}

.command-edit-modal.modern .modern-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.command-edit-modal.modern .input-hints {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.command-edit-modal.modern .hint-tag {
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* Tier Lock */
.command-edit-modal.modern .tier-lock {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--surface);
    border: 2px dashed var(--border);
    border-radius: 16px;
    text-align: center;
}

.command-edit-modal.modern .lock-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--warning);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.command-edit-modal.modern .lock-content h5 {
    color: var(--text);
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
}

.command-edit-modal.modern .lock-content p {
    color: var(--text-muted);
    margin: 0 0 16px 0;
    font-size: 14px;
    line-height: 1.5;
}

.command-edit-modal.modern .tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.command-edit-modal.modern .tier-badge.starter {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
}

.command-edit-modal.modern .tier-badge.pro {
    background: rgba(168, 85, 247, 0.1);
    color: #A855F7;
}

.command-edit-modal.modern .modal-actions {
    padding: 24px 32px 32px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    background: var(--surface-hover);
    border-radius: 0 0 20px 20px;
}

.command-edit-modal.modern .btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 120px;
}

.command-edit-modal.modern .btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 2px solid var(--border);
}

.command-edit-modal.modern .btn-secondary:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.command-edit-modal.modern .btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}

.command-edit-modal.modern .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

/* Modern Message Builder Styles */
.command-edit-modal.modern .message-builder {
    margin-top: 8px;
}

.command-edit-modal.modern .builder-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.command-edit-modal.modern .builder-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 6px 0;
}

.command-edit-modal.modern .builder-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.4;
}

/* Visibility Settings in Setting Card */
.command-edit-modal.modern .visibility-toggles-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.command-edit-modal.modern .toggle-label-compact {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.command-edit-modal.modern .toggle-label-compact:hover {
    background: rgba(6, 182, 212, 0.05);
    border-color: var(--primary);
}

.command-edit-modal.modern .toggle-text-compact {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.command-edit-modal.modern .toggle-text-compact strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.command-edit-modal.modern .toggle-text-compact small {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Builder Tabs */
.command-edit-modal.modern .builder-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.command-edit-modal.modern .tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: all 0.2s ease;
    position: relative;
}

.command-edit-modal.modern .tab-btn:hover {
    background: rgba(6, 182, 212, 0.05);
    color: var(--primary);
}

.command-edit-modal.modern .tab-btn.active {
    background: var(--primary);
    color: white;
}

.command-edit-modal.modern .tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

/* Tab Content */
.command-edit-modal.modern .tab-content {
    display: none;
}

.command-edit-modal.modern .tab-content.active {
    display: block;
}

/* DM Message Tab - 2 column layout (content + preview) */
#dm-message .builder-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto auto auto;
    gap: 24px;
    align-items: start;
}

/* Command Response Tab - 2 column layout */
#command-response .builder-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto auto;
    gap: 24px;
    align-items: start;
}

/* Welcome Modal Grid Layout - Same as DM message */
#welcomeEditModal .builder-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto auto auto;
    gap: 24px;
    align-items: start;
}

/* Util Modal Grid Layout - Same as DM message */
#utilEditModal .builder-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto auto auto;
    gap: 24px;
    align-items: start;
}

/* Grid Section Positioning - Util Modal (2 columns) */
#utilEditModal .content-section {
    grid-column: 1;
    grid-row: 1;
}

#utilEditModal .appearance-section {
    grid-column: 1;
    grid-row: 2;
}

#utilEditModal .variables-section {
    grid-column: 1;
    grid-row: 3;
}

#utilEditModal .preview-section {
    grid-column: 2;
    grid-row: 1 / 4;
    min-height: 500px;
}

/* Verification Button Preview */
.verification-button-preview {
    margin-top: 12px;
    padding: 12px;
    background: #2f3136;
    border-radius: 8px;
    border: 1px solid #40444b;
}

.verify-btn {
    background: #5865f2;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.verify-btn:hover {
    background: #4752c4;
}

.command-edit-modal.modern .grid-section {
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.2s ease;
}

.command-edit-modal.modern .grid-section:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(6, 182, 212, 0.1);
}

/* Grid Section Positioning - DM Message Tab (2 columns) */
#dm-message .content-section {
    grid-column: 1;
    grid-row: 1;
}

#dm-message .appearance-section {
    grid-column: 1;
    grid-row: 2;
}

#dm-message .variables-section {
    grid-column: 1;
    grid-row: 3;
}

#dm-message .preview-section {
    grid-column: 2;
    grid-row: 1 / 4;
    min-height: 500px;
}

/* Grid Section Positioning - Command Response Tab (2 columns) */
#command-response .content-section {
    grid-column: 1;
    grid-row: 1;
}

#command-response .appearance-section {
    grid-column: 1;
    grid-row: 2;
}

#command-response .variables-section {
    grid-column: 1;
    grid-row: 3;
}

#command-response .preview-section {
    grid-column: 2;
    grid-row: 1 / 4;
    min-height: 500px;
}

/* Welcome Modal Grid Section Positioning - Same as DM message */
#welcomeEditModal .content-section {
    grid-column: 1;
    grid-row: 1;
}

#welcomeEditModal .appearance-section {
    grid-column: 1;
    grid-row: 2;
}

#welcomeEditModal .variables-section {
    grid-column: 1;
    grid-row: 3;
}

#welcomeEditModal .preview-section {
    grid-column: 2;
    grid-row: 1 / 4;
    min-height: 500px;
}

.command-edit-modal.modern .preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.command-edit-modal.modern .section-header {
    margin-bottom: 16px;
}

.command-edit-modal.modern .section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.command-edit-modal.modern .section-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.3;
}

.command-edit-modal.modern .input-group {
    margin-bottom: 16px;
}

.command-edit-modal.modern .input-group:last-child {
    margin-bottom: 0;
}

.command-edit-modal.modern .input-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.command-edit-modal.modern .builder-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s ease;
}

.command-edit-modal.modern .builder-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.command-edit-modal.modern .builder-textarea {
    width: 100%;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: all 0.2s ease;
    font-family: inherit;
}

.command-edit-modal.modern .builder-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

/* Color Selector */
.command-edit-modal.modern .color-selector {
    margin-bottom: 16px;
}

.command-edit-modal.modern .color-options {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.command-edit-modal.modern .color-option {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.command-edit-modal.modern .color-option:hover {
    transform: scale(1.1);
}

.command-edit-modal.modern .color-option.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.2);
}

.command-edit-modal.modern .color-option.custom-color {
    background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080);
    border: 2px solid var(--border);
}

.command-edit-modal.modern .custom-color-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Variable Buttons */
.command-edit-modal.modern .variable-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.command-edit-modal.modern .variable-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.command-edit-modal.modern .variable-btn:hover {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.05);
    transform: translateY(-2px);
}

.command-edit-modal.modern .variable-icon {
    font-size: 16px;
}

.command-edit-modal.modern .variable-text {
    font-size: 11px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.2;
}

/* Toggle Switches */
.command-edit-modal.modern .toggle-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.command-edit-modal.modern .toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.command-edit-modal.modern .toggle-label:hover {
    background: rgba(6, 182, 212, 0.05);
}

.command-edit-modal.modern .toggle-input {
    display: none;
}

.command-edit-modal.modern .toggle-slider {
    width: 44px;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.command-edit-modal.modern .toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.command-edit-modal.modern .toggle-input:checked + .toggle-slider {
    background: var(--primary);
}

.command-edit-modal.modern .toggle-input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

.command-edit-modal.modern .toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.command-edit-modal.modern .toggle-text strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.command-edit-modal.modern .toggle-text small {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}


/* Preview Section */
.command-edit-modal.modern .builder-preview {
    position: sticky;
    top: 20px;
}

.command-edit-modal.modern .preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.command-edit-modal.modern .preview-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.command-edit-modal.modern .preview-badge {
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.command-edit-modal.modern .discord-preview {
    background: #36393F;
    border-radius: 16px;
    padding: 16px;
    border: 1px solid #4F545C;
}

.command-edit-modal.modern .discord-message {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.command-edit-modal.modern .discord-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
}

.command-edit-modal.modern .discord-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.command-edit-modal.modern .discord-content {
    flex: 1;
    min-width: 0;
}

.command-edit-modal.modern .discord-username {
    font-size: 14px;
    font-weight: 600;
    color: #FFFFFF;
    margin-bottom: 4px;
}

.command-edit-modal.modern .discord-embed {
    background: #2F3136;
    border-radius: 4px;
    padding: 8px 16px 8px 12px;
    font-family: 'Whitney', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.375;
    color: #DCDDDE;
    position: relative;
}

.command-edit-modal.modern .embed-color-bar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 2px 0 0 2px;
}

.command-edit-modal.modern .embed-title {
    color: #FFFFFF;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.375;
    margin-bottom: 8px;
}

.command-edit-modal.modern .embed-description {
    color: #DCDDDE;
    margin-bottom: 8px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.command-edit-modal.modern .embed-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #72767D;
    margin-top: 8px;
}

.command-edit-modal.modern .embed-timestamp {
    font-size: 12px;
    color: #72767D;
}

.command-edit-modal.modern .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 24px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    border-radius: 0 0 12px 12px;
}

#utilEditModal .setting-card.full-width {
    width: 100% !important;
    grid-column: 1 / -1 !important;
    margin-bottom: 0 !important;
}

#utilEditModal .command-edit-modal.modern .modal-actions {
    padding: 24px 32px 32px !important;
    border-top: 1px solid var(--border) !important;
    display: flex !important;
    gap: 16px !important;
    justify-content: flex-end !important;
    background: var(--surface-hover) !important;
    border-radius: 0 0 20px 20px !important;
    position: relative !important;
    z-index: 10 !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    /* DM Message Tab - Single column */
    #dm-message .builder-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 20px;
    }
    
    #dm-message .content-section {
        grid-column: 1;
        grid-row: 1;
    }
    
    #dm-message .appearance-section {
        grid-column: 1;
        grid-row: 2;
    }
    
    #dm-message .variables-section {
        grid-column: 1;
        grid-row: 3;
    }
    
    #dm-message .preview-section {
        grid-column: 1;
        grid-row: 4;
        min-height: 300px;
    }
    
    /* Command Response Tab - Single column */
    #command-response .builder-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 20px;
    }
    
    #command-response .content-section {
        grid-column: 1;
        grid-row: 1;
    }
    
    #command-response .appearance-section {
        grid-column: 1;
        grid-row: 2;
    }
    
    #command-response .variables-section {
        grid-column: 1;
        grid-row: 3;
    }
    
    #command-response .preview-section {
        grid-column: 1;
        grid-row: 4;
        min-height: 300px;
    }
    
    /* Util Modal - Single column */
    #utilEditModal .builder-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 20px;
    }
    
    #utilEditModal .content-section {
        grid-column: 1;
        grid-row: 1;
    }
    
    #utilEditModal .appearance-section {
        grid-column: 1;
        grid-row: 2;
    }
    
    #utilEditModal .variables-section {
        grid-column: 1;
        grid-row: 3;
    }
    
    #utilEditModal .preview-section {
        grid-column: 1;
        grid-row: 4;
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    /* DM Message Tab - Single column */
    #dm-message .builder-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    #dm-message .content-section,
    #dm-message .appearance-section,
    #dm-message .variables-section,
    #dm-message .preview-section {
        grid-column: 1;
    }
    
    #dm-message .preview-section {
        min-height: 250px;
    }
    
    /* Command Response Tab - Single column */
    #command-response .builder-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    #command-response .content-section,
    #command-response .appearance-section,
    #command-response .variables-section,
    #command-response .preview-section {
        grid-column: 1;
    }
    
    #command-response .preview-section {
        min-height: 250px;
    }
    
    /* Util Modal - Single column */
    #utilEditModal .builder-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    #utilEditModal .content-section,
    #utilEditModal .appearance-section,
    #utilEditModal .variables-section,
    #utilEditModal .preview-section {
        grid-column: 1;
    }
    
    #utilEditModal .preview-section {
        min-height: 250px;
    }
    
    .command-edit-modal.modern .variable-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .command-edit-modal.modern .variable-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .command-edit-modal.modern .grid-section {
        padding: 20px;
    }
}

/* Enhanced Role Dropdown for Command Modal */
.command-edit-modal .role-dropdown-container select[multiple] {
    min-height: 140px;
    padding: 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.875rem;
    line-height: 1.6;
    transition: all 0.3s ease;
}

.command-edit-modal .role-dropdown-container select[multiple]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.1);
}

.command-edit-modal .role-dropdown-container option {
    padding: 0.75rem 1rem;
    background: var(--surface);
    color: var(--text);
    border-radius: 6px;
    margin: 0.25rem 0;
    transition: all 0.2s ease;
}

.command-edit-modal .role-dropdown-container option:checked {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.command-edit-modal .role-dropdown-container option:hover {
    background: var(--surface-hover);
}

/* Responsive adjustments for command cards */
@media (max-width: 768px) {
    .card-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .card .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .role-dropdown-container select[multiple] {
        min-height: 100px;
    }
    
    .command-edit-modal {
        width: 95%;
        margin: 1rem;
    }
    
    .command-edit-modal .modal-header {
        padding: 1.5rem 1.5rem 1rem 1.5rem;
    }
    
    .command-edit-modal .modal-body {
        padding: 1.5rem;
    }
    
    .command-edit-modal .modal-actions {
        padding: 1rem 1.5rem 1.5rem 1.5rem;
        flex-direction: column;
    }
    
    .command-edit-modal .modal-actions .btn-modal {
        width: 100%;
    }
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.activity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.activity-item:hover {
    background: linear-gradient(135deg, var(--hover-bg) 0%, rgba(6, 182, 212, 0.1) 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.activity-item:hover::before {
    opacity: 1;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Quick Actions */
.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 80px;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.quick-action-btn:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(6, 182, 212, 0.25);
    text-decoration: none;
    color: var(--text-primary);
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
}

.quick-action-btn:hover::before {
    left: 100%;
}

.quick-action-btn:active {
    transform: translateY(-2px);
    transition: transform 0.1s ease;
}

.quick-action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    font-weight: 700;
}

.quick-action-btn:hover .quick-action-icon {
    transform: scale(1.15);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.quick-action-content {
    flex: 1;
    text-align: left;
}

.quick-action-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.quick-action-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
    opacity: 0.9;
}

/* Welcome System Styles */
.warning-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.warning-content strong {
    color: var(--warning);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

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

.verification-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    margin: 1rem 0;
}

.verification-warning .warning-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.verification-warning .warning-content strong {
    color: var(--danger);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.verification-warning .warning-content p {
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.verification-warning .warning-content ul {
    color: var(--text-muted);
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
}

.verification-warning .warning-content li {
    margin-bottom: 0.25rem;
}

.unverified-role-status {
    margin: 1rem 0;
}

.role-status {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.role-status.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.role-status.inactive {
    background: linear-gradient(135deg, rgba(107, 114, 128, 0.1) 0%, rgba(107, 114, 128, 0.05) 100%);
    border-color: rgba(107, 114, 128, 0.3);
}

.status-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.status-content strong {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.role-status.active .status-content strong {
    color: var(--success);
}

.role-status.inactive .status-content strong {
    color: var(--text-muted);
}

.status-content p {
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.captcha-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 8px;
    margin-top: 1rem;
}

.captcha-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.captcha-text strong {
    color: var(--primary);
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.captcha-text p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.9rem;
}

.verification-button-preview {
    margin-top: 0.5rem;
}

.verify-btn-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: not-allowed;
    opacity: 0.7;
}

.verify-btn-preview svg {
    width: 16px;
    height: 16px;
}

/* Embed Builder Tabs for Welcome */
.embed-builder-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.embed-tab {
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.embed-tab:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.embed-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.embed-tab-content {
    display: none;
}

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

.embed-builder-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 1.5rem;
    align-items: start;
}

.embed-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.embed-section-header {
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.embed-section-header h5 {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.variable-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variable-btn {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.variable-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
}

.pro-feature-notice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 12px;
    margin: 1rem 0;
}

.pro-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.pro-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--warning);
    font-weight: 600;
}

.pro-content p {
    margin: 0 0 1rem 0;
    color: var(--text-muted);
}

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

.welcome-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Server Selector Card */
.server-selector-card {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
}

.server-selector-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.server-selector-header .setting-label {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.server-selector-header .form-select {
    flex: 1;
    max-width: 300px;
}

/* Disabled toggle switches */
.form-switch input[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-switch input[disabled] + .form-switch-slider {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: var(--border);
}

.form-switch input[disabled]:checked + .form-switch-slider {
    background-color: var(--border);
}

.form-switch input[disabled]:checked + .form-switch-slider::before {
    background-color: var(--text-muted);
}

/* Role Search Bar */
.role-search {
    margin-bottom: 1rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    z-index: 1;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

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

/* General Role Checkbox Styles (for non-modal contexts) */
.role-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 8px;
}

.role-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.role-checkbox:hover {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.05);
}

.role-checkbox.checked {
    border-color: var(--primary);
    background: rgba(6, 182, 212, 0.1);
}

.role-checkbox input[type="radio"] {
    display: none;
}

.role-checkbox input[type="checkbox"] {
    display: none;
}

.role-checkbox::before {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.role-checkbox.checked::before {
    background: var(--primary);
    border-color: var(--primary);
}

.role-checkbox.checked::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.role-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.role-color {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

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

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

.toggle-switch input:disabled + .toggle-slider {
    cursor: not-allowed;
    opacity: 0.6;
}

.toggle-switch input:disabled + .toggle-slider:before {
    background-color: #f3f3f3;
}

