/* ==========================================================================
   BOOTSTRAP ADMIN DASHBOARD - CUSTOM STYLES
   ========================================================================== */

/* ==========================================================================
   CSS VARIABLES & THEME
   ========================================================================== */

:root {
    /* Primary Colors */
    --bs-primary: #667eea;
    --bs-primary-rgb: 102, 126, 234;
    --bs-secondary: #6c757d;
    --bs-success: #28a745;
    --bs-info: #17a2b8;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #343a40;
    
    /* Custom Dashboard Variables */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --header-height: 70px;
    --border-radius: 0.75rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-info: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-warning: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-danger: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    
    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-fast: all 0.15s ease-out;
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    overflow-x: hidden;
}

/* ==========================================================================
   DASHBOARD LAYOUT
   ========================================================================== */

.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   SIDEBAR STYLES
   ========================================================================== */

.sidebar {
    width: var(--sidebar-width);
    background: var(--gradient-primary);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition-base);
    overflow-y: auto;
    box-shadow: var(--box-shadow-lg);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.sidebar-brand h4 {
    background: linear-gradient(45deg, #fff, #f8f9fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    margin: 0.25rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition-base);
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(8px);
}

.sidebar .nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link i {
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   MAIN CONTENT STYLES
   ========================================================================== */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: var(--transition-base);
    flex: 1;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed-width);
}

/* Top Navigation */
.navbar {
    height: var(--header-height);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.avatar {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.avatar-sm {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

/* Waitlist specific styles */
.bulk-actions {
    display: none;
}

.bulk-actions.show {
    display: inline-block !important;
}

/* Content Wrapper */
.content-wrapper {
    padding: 2rem;
}

.content-section {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

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

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

/* ==========================================================================
   PAGE HEADER STYLES
   ========================================================================== */

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #6c757d;
    font-weight: 500;
}

/* ==========================================================================
   CARD STYLES
   ========================================================================== */

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition-base);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* ==========================================================================
   STAT CARD STYLES
   ========================================================================== */

.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-base);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    border-radius: var(--border-radius);
    flex-shrink: 0;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #344767;
    line-height: 1;
}

.stat-label {
    color: #67748e;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   ACTION CARD STYLES
   ========================================================================== */

.action-card {
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition-base);
    z-index: 0;
}

.action-card:hover::before {
    opacity: 0.1;
}

.action-card > * {
    position: relative;
    z-index: 1;
}

.action-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--bs-primary) !important;
}

.action-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.action-title {
    font-weight: 700;
    color: #344767;
    margin-bottom: 0.5rem;
}

.action-description {
    color: #67748e;
    line-height: 1.6;
}

/* ==========================================================================
   CHART STYLES
   ========================================================================== */

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-container canvas {
    max-height: 300px !important;
}

/* ==========================================================================
   STATUS INDICATOR STYLES
   ========================================================================== */

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-item {
    padding: 0.75rem 0;
}

/* ==========================================================================
   FORM STYLES
   ========================================================================== */

.form-control,
.form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition-base);
    font-size: 0.875rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: #344767;
    margin-bottom: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* ==========================================================================
   BUTTON STYLES
   ========================================================================== */

.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition-base);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition-base);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--bs-primary);
    color: var(--bs-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: translateY(-2px);
}

/* ==========================================================================
   TAB STYLES
   ========================================================================== */

.nav-tabs {
    border-bottom: 2px solid #e9ecef;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    color: #67748e;
    font-weight: 600;
    padding: 1rem 1.5rem;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.nav-tabs .nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-base);
}

.nav-tabs .nav-link:hover {
    border-color: transparent;
    color: var(--bs-primary);
    background: rgba(102, 126, 234, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--bs-primary);
    background: white;
    border-color: transparent;
}

.nav-tabs .nav-link.active::before {
    transform: scaleX(1);
}

/* ==========================================================================
   COUNTDOWN STYLES
   ========================================================================== */

.countdown-segment {
    text-align: center;
}

.countdown-segment .display-4 {
    font-weight: 800;
    line-height: 1;
}

.countdown-segment small {
    font-size: 0.875rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .stat-card .d-flex {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-bottom: 1rem;
    }
    
    .action-card {
        margin-bottom: 1rem;
    }
    
    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.75rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .countdown-segment .display-4 {
        font-size: 2rem;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.bg-gradient-success {
    background: var(--gradient-success);
}

.bg-gradient-info {
    background: var(--gradient-info);
}

.bg-gradient-warning {
    background: var(--gradient-warning);
}

.bg-gradient-danger {
    background: var(--gradient-danger);
}

.shadow-primary {
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3) !important;
}

.shadow-lg-hover {
    transition: var(--transition-base);
}

.shadow-lg-hover:hover {
    box-shadow: var(--box-shadow-lg) !important;
    transform: translateY(-4px);
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.spinner-border-primary {
    color: var(--bs-primary);
}

/* ==========================================================================
   TOAST NOTIFICATIONS - UNIFIED SYSTEM
   ========================================================================== */

/* Toast container is positioned in HTML with Bootstrap classes: */
/* <div class="toast-container position-fixed top-0 end-0 p-3" id="toast-container" style="z-index: 1055;"></div> */

/* Enhanced Bootstrap toast styling for better visibility */
.toast {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0.5rem;
    min-width: 350px;
    margin-bottom: 0.75rem;
}

.toast-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem 0.5rem 0 0;
}

.toast-body {
    padding: 0.75rem;
    background-color: #fff;
    border-radius: 0 0 0.5rem 0.5rem;
}

.toast-icon {
    flex-shrink: 0;
}

/* ==========================================================================
   TYGA TOAST SYSTEM - CONSOLIDATED STYLES
   ========================================================================== */

/* Tyga Toast Container */
.tyga-toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Tyga Toast Base */
.tyga-toast {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    min-width: 300px;
    animation: slideInDown 0.3s ease-out;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    opacity: 0;
    transform: translateX(100%);
}

.tyga-toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* Toast Content Layout */
.tyga-toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tyga-toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.tyga-toast-message {
    flex: 1;
    color: #344767;
    font-weight: 500;
}

.tyga-toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.tyga-toast-text {
    font-size: 0.875rem;
    opacity: 0.9;
}

.tyga-toast-close {
    background: none;
    border: none;
    color: #8392ab;
    cursor: pointer;
    font-size: 1.125rem;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease-out;
}

.tyga-toast-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #344767;
}

/* Toast Animation States */
.tyga-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.tyga-toast:not(.show) {
    opacity: 0;
    transform: translateX(100%);
}

/* Toast Type Variants */
.tyga-toast-success::before { 
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); 
}
.tyga-toast-success .tyga-toast-icon { 
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); 
}

.tyga-toast-error::before { 
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); 
}
.tyga-toast-error .tyga-toast-icon { 
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%); 
}

.tyga-toast-warning::before { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); 
}
.tyga-toast-warning .tyga-toast-icon { 
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); 
}

.tyga-toast-info::before { 
    background: var(--gradient-primary); 
}
.tyga-toast-info .tyga-toast-icon { 
    background: var(--gradient-primary); 
}

/* Toast Animations */
@keyframes slideInDown {
    from {
        transform: translate3d(0, -100%, 0);
        visibility: visible;
    }
    to {
        transform: translate3d(0, 0, 0);
    }
}

/* Responsive toast styling */
@media (max-width: 576px) {
    .toast,
    .tyga-toast {
        min-width: auto;
        max-width: 100%;
    }
    
    .tyga-toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }
    
    .tyga-toast {
        min-width: auto;
    }
}

/* ==========================================================================
   CUSTOM SCROLLBAR
   ========================================================================== */

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   THEME EDITOR STYLES
   ========================================================================== */

/* Theme Editor Layout */
.whitelabel-modern-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.theme-presets-section,
.custom-theme-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.section-header-modern {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.section-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #344767;
}

.section-info p {
    margin: 0;
    color: #67748e;
    font-size: 0.875rem;
}

/* Theme Presets Grid */
.theme-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

.theme-preset-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    transition: var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.theme-preset-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-base);
}

.theme-preset-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--box-shadow-lg);
    border-color: var(--bs-primary);
}

.theme-preset-card:hover::before {
    transform: scaleX(1);
}

.theme-preset-card.active {
    border-color: var(--bs-primary);
    background: rgba(102, 126, 234, 0.02);
}

.theme-preset-card.active::before {
    transform: scaleX(1);
}

.preset-preview {
    margin-bottom: 1rem;
}

.preview-colors {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preview-text h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: #344767;
}

.preview-text p {
    font-size: 0.875rem;
    margin: 0;
    color: #67748e;
}

.preset-info h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
    color: #344767;
}

/* Custom Theme Dashboard */
.custom-theme-dashboard {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    padding: 1.5rem;
}

.theme-left-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.theme-right-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Modern Config Cards */
.modern-config-card,
.modern-preview-card,
.modern-actions-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.config-header,
.preview-header,
.actions-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.config-header h4,
.preview-header h3,
.actions-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #344767;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.config-content,
.actions-content {
    padding: 1.25rem;
}

/* Color Input Grid */
.color-inputs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.color-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.color-input-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #344767;
}

.color-input-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.color-input {
    width: 48px;
    height: 48px;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition-base);
    padding: 0;
}

.color-input:hover {
    transform: scale(1.05);
    box-shadow: var(--box-shadow);
}

.color-text-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    transition: var(--transition-base);
}

.color-text-input:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

/* Typography Configuration */
.typography-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modern-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modern-form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #344767;
}

.modern-select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    background: white;
    font-size: 0.875rem;
    transition: var(--transition-base);
    cursor: pointer;
}

.modern-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.form-help {
    font-size: 0.75rem;
    color: #67748e;
    margin-top: 0.25rem;
}

/* Theme Preview */
.theme-preview-container {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1rem;
    min-height: 300px;
}

.preview-dashboard {
    display: flex;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    min-height: 250px;
}

.preview-sidebar {
    width: 200px;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
}

.preview-sidebar-header h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 1rem 0;
    color: white;
}

.preview-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.preview-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: var(--transition-base);
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
}

.preview-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.preview-menu-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.preview-content {
    flex: 1;
    padding: 1rem;
    background: #f8f9fa;
}

.preview-header-bar {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.preview-header-bar h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #344767;
}

.preview-user {
    font-size: 0.875rem;
    color: #67748e;
}

.preview-cards {
    display: flex;
    gap: 1rem;
}

.preview-card {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.preview-stat {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.preview-stat-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
}

.preview-stat-content {
    flex: 1;
}

.preview-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #344767;
    line-height: 1;
}

.preview-stat-label {
    font-size: 0.75rem;
    color: #67748e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-button-primary,
.preview-button-secondary {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition-base);
}

.preview-button-primary {
    background: var(--gradient-primary);
    color: white;
}

.preview-button-secondary {
    background: transparent;
    color: var(--bs-primary);
    border: 2px solid var(--bs-primary);
}

/* Modern Buttons */
.modern-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
    position: relative;
    overflow: hidden;
}

.modern-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), transparent);
    opacity: 0;
    transition: var(--transition-base);
}

.modern-btn:hover::before {
    opacity: 1;
}

.modern-btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.modern-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.modern-btn-secondary {
    background: transparent;
    color: var(--bs-primary);
    border: 2px solid var(--bs-primary);
}

.modern-btn-secondary:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
}

/* Actions Content */
.actions-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Responsive Design for Theme Editor */
@media (max-width: 1200px) {
    .custom-theme-dashboard {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .theme-right-panel {
        order: -1;
    }
}

@media (max-width: 768px) {
    .theme-presets-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .color-inputs-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-dashboard {
        flex-direction: column;
        min-height: auto;
    }
    
    .preview-sidebar {
        width: 100%;
    }
    
    .preview-menu {
        flex-direction: row;
        overflow-x: auto;
        gap: 0.5rem;
    }
    
    .preview-menu-item {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .preview-cards {
        flex-direction: column;
    }
    
    .section-header-modern {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .custom-theme-dashboard {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .color-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .color-input {
        width: 100%;
        height: 48px;
    }
    
    .modern-btn {
        justify-content: center;
        width: 100%;
    }
    
    .preview-stat {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* ==========================================================================
   DARK MODE SUPPORT - ENHANCED
   ========================================================================== */

/* Dark theme class-based styling (applied when dark theme is active) */
.dark-theme {
    --bs-body-bg: #0f172a;
    --bs-body-color: #f8fafc;
    --bs-card-bg: #1e293b;
    --bs-border-color: #334155;
}

.dark-theme .main-content {
    background-color: #0f172a;
    color: #f8fafc;
}

.dark-theme .navbar {
    background-color: #1e293b !important;
    border-color: #334155;
}

.dark-theme .card {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #334155;
}

.dark-theme .form-control,
.dark-theme .form-select {
    background-color: #334155;
    border-color: #475569;
    color: #f8fafc;
}

.dark-theme .form-control:focus,
.dark-theme .form-select:focus {
    background-color: #334155;
    border-color: var(--bs-primary);
    color: #f8fafc;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.dark-theme .form-control::placeholder {
    color: #94a3b8;
}

/* Dark mode theme editor components */
.dark-theme .theme-presets-section,
.dark-theme .custom-theme-section,
.dark-theme .modern-config-card,
.dark-theme .modern-preview-card,
.dark-theme .modern-actions-card {
    background-color: #1e293b;
    border-color: #334155;
}

.dark-theme .section-header-modern,
.dark-theme .config-header,
.dark-theme .preview-header,
.dark-theme .actions-header {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    color: #f8fafc;
}

.dark-theme .section-info h4,
.dark-theme .config-header h4,
.dark-theme .preview-header h3,
.dark-theme .actions-header h3 {
    color: #f8fafc;
}

.dark-theme .section-info p {
    color: #cbd5e1;
}

.dark-theme .theme-preset-card {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

.dark-theme .theme-preset-card:hover {
    border-color: var(--bs-primary);
    background-color: #334155;
}

.dark-theme .theme-preset-card.active {
    border-color: var(--bs-primary);
    background-color: #334155;
}

.dark-theme .preset-info h4 {
    color: #f8fafc;
}

.dark-theme .preview-text h5 {
    color: #f8fafc;
}

.dark-theme .preview-text p {
    color: #cbd5e1;
}

.dark-theme .preview-dashboard {
    background-color: #1e293b;
}

.dark-theme .preview-content {
    background-color: #0f172a;
}

.dark-theme .preview-card {
    background-color: #334155;
}

.dark-theme .preview-header-bar h5 {
    color: #f8fafc;
}

.dark-theme .preview-user {
    color: #cbd5e1;
}

.dark-theme .preview-stat-number {
    color: #f8fafc;
}

.dark-theme .preview-stat-label {
    color: #94a3b8;
}

.dark-theme .color-text-input,
.dark-theme .modern-select {
    background-color: #334155;
    border-color: #475569;
    color: #f8fafc;
}

.dark-theme .color-text-input:focus,
.dark-theme .modern-select:focus {
    background-color: #334155;
    border-color: var(--bs-primary);
    color: #f8fafc;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.dark-theme .color-input-group label,
.dark-theme .modern-form-group label {
    color: #f8fafc;
}

.dark-theme .form-help {
    color: #94a3b8;
}

.dark-theme .modern-btn-secondary {
    background-color: transparent;
    color: #f8fafc;
    border-color: #475569;
}

.dark-theme .modern-btn-secondary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.dark-theme .alert {
    background-color: #334155;
    border-color: #475569;
    color: #f8fafc;
}

.dark-theme .alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.dark-theme .alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.dark-theme .alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Dark theme for content wrapper and sections */
.dark-theme .content-wrapper {
    background-color: #0f172a;
    color: #f8fafc;
}

.dark-theme .content-section {
    background-color: #0f172a;
    color: #f8fafc;
}

.dark-theme .page-title {
    color: #f8fafc;
}

.dark-theme .page-subtitle {
    color: #cbd5e1;
}

/* Dark theme for buttons */
.dark-theme .btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
    background-color: transparent;
}

.dark-theme .btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* Dark theme for tables and data displays */
.dark-theme .table {
    --bs-table-bg: #1e293b;
    --bs-table-color: #f8fafc;
    --bs-table-border-color: #334155;
    --bs-table-striped-bg: #334155;
    --bs-table-hover-bg: #475569;
}

.dark-theme .table th {
    border-color: #334155;
    color: #f8fafc;
}

.dark-theme .table td {
    border-color: #334155;
    color: #f8fafc;
}

/* Dark theme for dropdowns */
.dark-theme .dropdown-menu {
    background-color: #1e293b;
    border-color: #334155;
}

.dark-theme .dropdown-item {
    color: #f8fafc;
}

.dark-theme .dropdown-item:hover {
    background-color: #334155;
    color: #f8fafc;
}

/* Dark theme for modals */
.dark-theme .modal-content {
    background-color: #1e293b;
    border-color: #334155;
}

.dark-theme .modal-header {
    border-color: #334155;
}

.dark-theme .modal-footer {
    border-color: #334155;
}

.dark-theme .modal-title {
    color: #f8fafc;
}

.dark-theme .modal-body {
    color: #f8fafc;
}

/* Dark theme for badges and labels */
.dark-theme .badge {
    background-color: #334155;
    color: #f8fafc;
}

/* Dark theme for progress bars */
.dark-theme .progress {
    background-color: #334155;
}

/* Dark theme for list groups */
.dark-theme .list-group-item {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

.dark-theme .list-group-item:hover {
    background-color: #334155;
}

/* Dark theme for nav tabs */
.dark-theme .nav-tabs {
    border-color: #334155;
}

.dark-theme .nav-tabs .nav-link {
    color: #cbd5e1;
}

.dark-theme .nav-tabs .nav-link:hover {
    border-color: #334155;
    color: #f8fafc;
    background-color: #334155;
}

.dark-theme .nav-tabs .nav-link.active {
    color: #f8fafc;
    background-color: #1e293b;
    border-color: #334155;
}

/* Dark theme for accordion */
.dark-theme .accordion-item {
    background-color: #1e293b;
    border-color: #334155;
}

.dark-theme .accordion-header button {
    background-color: #1e293b;
    color: #f8fafc;
}

.dark-theme .accordion-body {
    background-color: #1e293b;
    color: #f8fafc;
}

/* ==========================================================================
   LIGHT THEME SUPPORT - ENHANCED
   ========================================================================== */

/* Light theme class-based styling (applied when light theme is active) */
.light-theme {
    --bs-body-bg: #ffffff;
    --bs-body-color: #1e293b;
    --bs-card-bg: #ffffff;
    --bs-border-color: #e2e8f0;
}

.light-theme .main-content {
    background-color: #ffffff;
    color: #1e293b;
}

.light-theme .navbar {
    background-color: #ffffff !important;
    border-color: #e2e8f0;
}

.light-theme .card {
    background-color: #ffffff;
    color: #1e293b;
    border-color: #e2e8f0;
}

.light-theme .form-control,
.light-theme .form-select {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

.light-theme .form-control:focus,
.light-theme .form-select:focus {
    background-color: #ffffff;
    border-color: var(--bs-primary);
    color: #1e293b;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.light-theme .form-control::placeholder {
    color: #64748b;
}

/* Light mode theme editor components */
.light-theme .theme-presets-section,
.light-theme .custom-theme-section,
.light-theme .modern-config-card,
.light-theme .modern-preview-card,
.light-theme .modern-actions-card {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

.light-theme .section-header-modern,
.light-theme .config-header,
.light-theme .preview-header,
.light-theme .actions-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #1e293b;
}

.light-theme .section-info h4,
.light-theme .config-header h4,
.light-theme .preview-header h3,
.light-theme .actions-header h3 {
    color: #1e293b;
}

.light-theme .section-info p {
    color: #475569;
}

.light-theme .theme-preset-card {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

.light-theme .theme-preset-card:hover {
    border-color: var(--bs-primary);
    background-color: #f8fafc;
}

.light-theme .theme-preset-card.active {
    border-color: var(--bs-primary);
    background-color: #f8fafc;
}

.light-theme .preset-info h4 {
    color: #1e293b;
}

.light-theme .preview-text h5 {
    color: #1e293b;
}

.light-theme .preview-text p {
    color: #475569;
}

.light-theme .preview-dashboard {
    background-color: #ffffff;
}

.light-theme .preview-content {
    background-color: #f8fafc;
}

.light-theme .preview-card {
    background-color: #ffffff;
}

.light-theme .preview-header-bar h5 {
    color: #1e293b;
}

.light-theme .preview-user {
    color: #475569;
}

.light-theme .preview-stat-number {
    color: #1e293b;
}

.light-theme .preview-stat-label {
    color: #64748b;
}

.light-theme .color-text-input,
.light-theme .modern-select {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

.light-theme .color-text-input:focus,
.light-theme .modern-select:focus {
    background-color: #ffffff;
    border-color: var(--bs-primary);
    color: #1e293b;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.light-theme .color-input-group label,
.light-theme .modern-form-group label {
    color: #1e293b;
}

.light-theme .form-help {
    color: #64748b;
}

.light-theme .modern-btn-secondary {
    background-color: transparent;
    color: #1e293b;
    border-color: #e2e8f0;
}

.light-theme .modern-btn-secondary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.light-theme .alert {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #1e293b;
}

.light-theme .alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #047857;
}

.light-theme .alert-danger {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #dc2626;
}

.light-theme .alert-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #2563eb;
}

/* Light theme for content wrapper and sections */
.light-theme .content-wrapper {
    background-color: #ffffff;
    color: #1e293b;
}

.light-theme .content-section {
    background-color: #ffffff;
    color: #1e293b;
}

.light-theme .page-title {
    color: #1e293b;
}

.light-theme .page-subtitle {
    color: #475569;
}

/* Light theme for buttons */
.light-theme .btn-outline-primary {
    color: var(--bs-primary);
    border-color: var(--bs-primary);
    background-color: transparent;
}

.light-theme .btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

/* Light theme for tables and data displays */
.light-theme .table {
    --bs-table-bg: #ffffff;
    --bs-table-color: #1e293b;
    --bs-table-border-color: #e2e8f0;
    --bs-table-striped-bg: #f8fafc;
    --bs-table-hover-bg: #f1f5f9;
}

.light-theme .table th {
    border-color: #e2e8f0;
    color: #1e293b;
}

.light-theme .table td {
    border-color: #e2e8f0;
    color: #1e293b;
}

/* Light theme for dropdowns */
.light-theme .dropdown-menu {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

.light-theme .dropdown-item {
    color: #1e293b;
}

.light-theme .dropdown-item:hover {
    background-color: #f8fafc;
    color: #1e293b;
}

/* Light theme for modals */
.light-theme .modal-content {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

.light-theme .modal-header {
    border-color: #e2e8f0;
}

.light-theme .modal-footer {
    border-color: #e2e8f0;
}

.light-theme .modal-title {
    color: #1e293b;
}

.light-theme .modal-body {
    color: #1e293b;
}

/* Light theme for badges and labels */
.light-theme .badge {
    background-color: #f8fafc;
    color: #1e293b;
}

/* Light theme for progress bars */
.light-theme .progress {
    background-color: #f8fafc;
}

/* Light theme for list groups */
.light-theme .list-group-item {
    background-color: #ffffff;
    border-color: #e2e8f0;
    color: #1e293b;
}

.light-theme .list-group-item:hover {
    background-color: #f8fafc;
}

/* Light theme for nav tabs */
.light-theme .nav-tabs {
    border-color: #e2e8f0;
}

.light-theme .nav-tabs .nav-link {
    color: #475569;
}

.light-theme .nav-tabs .nav-link:hover {
    border-color: #e2e8f0;
    color: #1e293b;
    background-color: #f8fafc;
}

.light-theme .nav-tabs .nav-link.active {
    color: #1e293b;
    background-color: #ffffff;
    border-color: #e2e8f0;
}

/* Light theme for accordion */
.light-theme .accordion-item {
    background-color: #ffffff;
    border-color: #e2e8f0;
}

.light-theme .accordion-header button {
    background-color: #ffffff;
    color: #1e293b;
}

.light-theme .accordion-body {
    background-color: #ffffff;
    color: #1e293b;
}

/* Fallback for system dark mode preference */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #0f172a;
        --bs-body-color: #f8fafc;
    }
}
