/* Vidjet Admin Panel Styles */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #6c757d;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --light: #f8f9fa;
    --dark: #212529;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
}

/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f8fa;
    color: var(--gray-800);
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 999;
    background: var(--gray-800);
    color: #fff;
    transition: all 0.3s;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

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

.sidebar-header {
    padding: 20px;
    background: var(--gray-900);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.sidebar .list-unstyled {
    padding: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar .list-unstyled li {
    position: relative;
}

.sidebar .list-unstyled li a {
    padding: 12px 20px;
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: var(--gray-300);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar .list-unstyled li a i {
    margin-right: 10px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar .list-unstyled li a:hover {
    color: #fff;
    background: var(--gray-700);
}

.sidebar .list-unstyled li.active a {
    color: #fff;
    background: var(--primary);
}

.sidebar-footer {
    padding: 15px 20px;
    background: var(--gray-900);
    border-top: 1px solid var(--gray-700);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 0.9rem;
}

/* Content Styles */
#content {
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: all 0.3s;
    position: absolute;
    top: 0;
    right: 0;
}

#content.expanded {
    width: calc(100% - var(--sidebar-collapsed-width));
}

.navbar {
    padding: 15px 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.section-title {
    margin-bottom: 20px;
    font-weight: 600;
    color: var(--gray-800);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background-color: #fff;
    border-top: 1px solid var(--gray-200);
    padding: 15px 20px;
}

/* Stat Cards */
.stat-card {
    border-left: 4px solid var(--primary);
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    margin: 10px 0;
    color: var(--gray-800);
}

.stat-change {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

.stat-change.neutral {
    color: var(--gray-500);
}

/* Form Styles */
.form-label {
    font-weight: 500;
    color: var(--gray-700);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
}

/* Widget Preview */
.widget-preview {
    position: relative;
    height: 300px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--gray-100);
}

.widget-preview-toggle {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.widget-preview-window {
    position: absolute;
    bottom: 80px;
    right: 20px;
    width: 300px;
    height: 400px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.widget-preview-header {
    background-color: var(--primary);
    color: white;
    padding: 12px 16px;
}

.widget-preview-title {
    font-weight: 600;
}

.widget-preview-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: var(--gray-100);
}

.widget-preview-message {
    background-color: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
}

.widget-preview-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--gray-200);
    background-color: white;
}

.widget-preview-footer input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 20px;
    outline: none;
}

/* Prompt Cards */
.prompt-variables {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Analytics */
.stat-item {
    margin-bottom: 15px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: 5px;
}

.custom-date-range {
    display: none;
}

/* Toast Notifications */
.toast-container {
    z-index: 1050;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.active {
        margin-left: 0;
    }
    
    #content {
        width: 100%;
    }
    
    #content.active {
        width: calc(100% - var(--sidebar-width));
        position: relative;
    }
    
    .widget-preview-window {
        width: 250px;
        height: 350px;
    }
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background-color: var(--gray-900);
        color: var(--gray-200);
    }
    
    .card, .card-header, .card-footer {
        background-color: var(--gray-800);
        border-color: var(--gray-700);
    }
    
    .card-header {
        color: var(--gray-200);
    }
    
    .navbar {
        background-color: var(--gray-800) !important;
    }
    
    .form-control, .form-select {
        background-color: var(--gray-700);
        border-color: var(--gray-600);
        color: var(--gray-200);
    }
    
    .form-control:focus, .form-select:focus {
        background-color: var(--gray-700);
        color: var(--gray-200);
    }
    
    .section-title {
        color: var(--gray-200);
    }
    
    .stat-value {
        color: var(--gray-200);
    }
    
    .table {
        color: var(--gray-300);
    }
    
    .widget-preview {
        background-color: var(--gray-800);
        border-color: var(--gray-700);
    }
    
    .widget-preview-body {
        background-color: var(--gray-800);
    }
    
    .widget-preview-message {
        background-color: var(--gray-700);
        color: var(--gray-200);
    }
    
    .widget-preview-footer {
        background-color: var(--gray-800);
        border-color: var(--gray-700);
    }
    
    .widget-preview-footer input {
        background-color: var(--gray-700);
        border-color: var(--gray-600);
        color: var(--gray-200);
    }
}
