/* Admin Panel Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: #ffffff;
}

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

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    border-right: 3px solid #0066cc;
}

.sidebar.collapsed {
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-header,
.sidebar.collapsed .sidebar-nav,
.sidebar.collapsed .sidebar-footer {
    opacity: 0;
    transform: translateX(-100%);
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #fff;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 300;
}

.sidebar-nav ul {
    list-style: none;
    padding: 20px 0;
}

.nav-item {
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(0,102,204,0.2) !important;
    border-left-color: #0066cc !important;
}

.nav-item.active {
    background: linear-gradient(135deg, #0066cc, #004499) !important;
    border-left-color: #0066cc !important;
}

.nav-item i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-left: 0;
}

.top-bar {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: 3px solid #0066cc;
}

.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #2563eb;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 6px;
}

.sidebar-toggle:hover {
    background: rgba(3, 135, 135, 0.1);
    transform: scale(1.1);
}
    margin-right: 20px;
}

.top-bar-left {
    display: flex;
    align-items: center;
}

#page-title {
    font-size: 1.8rem;
    color: #ffffff;
    font-weight: 500;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2563eb;
}

.user-info i {
    font-size: 1.5rem;
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
}

.content-section {
    display: none;
}

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

/* Dashboard */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.stat-icon i {
    font-size: 1.8rem;
    color: white;
}

.stat-content h3 {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 10px;
    font-weight: 700;
}

.stat-content p {
    color: #666;
    font-size: 1.1rem;
    font-weight: 500;
}

.stat-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 5px;
}

.stat-content p {
    color: #666;
    font-size: 0.9rem;
}

/* Knowledge Base Section */
.knowledge-controls {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.knowledge-controls h3 {
    margin-bottom: 20px;
    color: #ffffff;
}

.control-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.add-knowledge-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.add-knowledge-section h4 {
    color: #2563eb;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.add-knowledge-form .form-row {
    margin-bottom: 20px;
}

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

.add-knowledge-form label {
    font-weight: 600;
    color: #ffffff;
}

.add-knowledge-form input[type="url"],
.add-knowledge-form input[type="file"],
.add-knowledge-form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.add-knowledge-form textarea {
    resize: vertical;
    min-height: 80px;
}

.add-knowledge-form button {
    margin-top: 10px;
    align-self: flex-start;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc, #004499);
    color: white;
    border: 1px solid #0052a3;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(196, 30, 58, 0.4);
    background: linear-gradient(135deg, #004499, #0066cc);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.knowledge-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.knowledge-stat {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    text-align: center;
}

.knowledge-stat h4 {
    color: #2563eb;
    margin-bottom: 10px;
}

.knowledge-stat .number {
    font-size: 2rem;
    font-weight: bold;
    color: #ffffff;
}

.knowledge-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.knowledge-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-bottom: 1px solid #e9ecef;
}

.knowledge-header h3 {
    color: #ffffff;
    margin-bottom: 5px;
}

.knowledge-table {
    width: 100%;
    border-collapse: collapse;
}

.knowledge-table th,
.knowledge-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.knowledge-table th {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    font-weight: 600;
    color: #ffffff;
}

.knowledge-table tr:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processed {
    background: #d4edda;
    color: #155724;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        z-index: 1000;
        height: 100vh;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .control-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2563eb;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 8px;
}

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

/* Success/Error messages */
.message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Learning Section Styles */
.learning-controls {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.learning-controls h3 {
    margin-bottom: 20px;
    color: #ffffff;
}

.learning-table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.learning-table th,
.learning-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.learning-table th {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    font-weight: 600;
    color: #ffffff;
}

.learning-table tr:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processed {
    background: #d4edda;
    color: #155724;
}

/* System Section Styles */
.system-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.action-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.action-card h3 {
    color: #ffffff;
    margin-bottom: 15px;
}

.action-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.system-status {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.system-status h3 {
    color: #ffffff;
    margin-bottom: 20px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 12px;
    border-left: 4px solid #e9ecef;
}

.status-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.status-ok {
    background: #28a745;
}

.status-error {
    background: #dc3545;
}

.status-info {
    flex: 1;
}

.status-info h4 {
    color: #ffffff;
    margin-bottom: 5px;
}

.status-info p {
    color: #666;
    font-size: 0.9rem;
}

/* Text Display for Learning Modal */
.text-display {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    min-height: 60px;
    white-space: pre-wrap;
    font-family: monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Button Sizes */
.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Table Container */
.table-container {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

/* Chat Section Styles */
.chat-controls {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.chat-controls h3 {
    margin-bottom: 20px;
    color: #ffffff;
}

.conversation-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.conversation-filters select,
.conversation-filters input {
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
}

.conversation-filters select {
    min-width: 150px;
}

.conversation-filters input {
    flex: 1;
    max-width: 300px;
}

.conversation-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.loading-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

.loading-message i {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 15px;
    display: block;
}

.conversation-item {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    border-left: 4px solid #2563eb;
}

.conversation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.conversation-header h4 {
    color: #ffffff;
    margin: 0;
}

.conversation-date {
    color: #666;
    font-size: 0.9rem;
}

.conversation-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.conversation-meta span {
    color: #666;
    font-size: 0.9rem;
}

.conversation-actions {
    display: flex;
    gap: 10px;
}

/* Section Headers */
.section-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.section-header h2 {
    color: #2563eb;
    font-size: 2rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header h2 i {
    color: #1d4ed8;
    font-size: 1.8rem;
}

.section-header p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
}

/* Settings Styles */
.settings-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.settings-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.settings-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.settings-card h3 {
    color: #2563eb;
    font-size: 1.3rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-card h3 i {
    color: #1d4ed8;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    color: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    color: #ffffff;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-input-wrapper input[type="color"] {
    width: 60px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.color-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    background: #2563eb;
}

.settings-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 25px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

/* Users Management Styles */
.users-section {
    padding: 20px;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.search-bar input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-bar button {
    padding: 8px 16px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.search-bar button:hover {
    background: #1d4ed8;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.role-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.role-admin {
    background: #d1ecf1;
    color: #0c5460;
}

.role-user {
    background: #e2e3e5;
    color: #383d41;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.chat-analytics {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-top: 30px;
}

.chat-analytics h3 {
    color: #ffffff;
    margin-bottom: 20px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.analytics-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #2563eb;
}

.analytics-card h4 {
    color: #ffffff;
    margin-bottom: 15px;
}

.question-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.question-item:last-child {
    border-bottom: none;
}

.question-text {
    color: #ffffff;
    flex: 1;
}

.question-count {
    background: #2563eb;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.sentiment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.sentiment-item:last-child {
    border-bottom: none;
}

.sentiment-label {
    color: #ffffff;
}

.sentiment-value {
    font-weight: 600;
}

.sentiment-item.positive .sentiment-value {
    color: #28a745;
}

.sentiment-item.neutral .sentiment-value {
    color: #6c757d;
}

.sentiment-item.negative .sentiment-value {
    color: #dc3545;
}

.no-data {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.no-data i {
    display: block;
    margin-bottom: 15px;
}

/* Login Modal Styles */
#login-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

#login-modal .modal-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    margin: 15% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

#login-modal .modal-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#login-modal .modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

#login-modal .modal-body {
    padding: 25px;
}

#login-modal .form-group {
    margin-bottom: 20px;
}

#login-modal .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 500;
}

#login-modal .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #0066cc;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #ffffff;
}

#login-modal .form-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #ffffff;
}

#login-modal .modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

#login-modal .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* 2FA Input Field */
#login-2fa-token {
    font-family: monospace;
    text-align: center;
    letter-spacing: 2px;
}

.form-help {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.5rem;
    display: block;
}

/* Message Modal Styles */
.messages-list {
    margin-top: 20px;
    max-height: 40vh;
    overflow-y: auto;
    padding-right: 10px;
}

.message-item {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #e9ecef;
}

.message-item.user {
    border-left-color: #2563eb;
}

.message-item.assistant {
    border-left-color: #28a745;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-role {
    font-weight: 600;
    color: #ffffff;
}

.message-time {
    color: #666;
    font-size: 0.8rem;
}

.message-content {
    color: #ffffff;
    line-height: 1.5;
}

.conversation-details {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.conversation-details h3 {
    margin: 0 0 15px 0;
    color: #ffffff;
}

.conversation-details p {
    margin: 5px 0;
    color: #666;
}

/* Table Styles */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.data-table th {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 18px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
}

.data-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #e9ecef;
    color: #ffffff;
}

.data-table tr:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
}

.data-table tr:last-child td {
    border-bottom: none;
}

/* Content Section Improvements */
.content-section {
    padding: 30px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    min-height: calc(100vh - 80px);
}

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

/* Modal Improvements */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 25px 30px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

/* Recent Activity Styles */
.recent-activity {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.recent-activity h3 {
    color: #2563eb;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recent-activity h3 i {
    color: #1d4ed8;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 5px;
}

.activity-time {
    color: #666;
    font-size: 0.9rem;
}

.no-activity {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* System Status Section */
.system-status-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    margin-bottom: 40px;
}

.system-status-section h3 {
    color: #2563eb;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.status-label {
    font-weight: 600;
    color: #ffffff;
}

.status-value {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: bold;
}

.status-value.status-ok {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.3);
}

.status-value.status-error {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.status-value.status-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-value.status-checking {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

/* Footer Styles */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    color: #666;
    font-size: 14px;
    border-top: 1px solid #e9ecef;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
}

.footer p {
    margin: 0;
}

/* Conversation Modal Styles */
.message-item {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border-left: 4px solid #2563eb;
}

.message-item.user {
    border-left-color: #28a745;
    background: #d4edda;
}

.message-item.assistant,
.message-item.bot {
    border-left-color: #007bff;
    background: #d1ecf1;
}

.message-item.system {
    border-left-color: #6c757d;
    background: #e2e3e5;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.message-role {
    font-weight: 600;
    color: #ffffff;
}

.message-time {
    color: #666;
    font-size: 0.8rem;
}

.message-content {
    color: #ffffff;
    line-height: 1.5;
    white-space: pre-wrap;
}

.conversation-details {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.conversation-details h3 {
    color: #2563eb;
    margin-bottom: 15px;
}

.conversation-details p {
    margin: 8px 0;
    color: #ffffff;
}

.messages-list h4 {
    color: #2563eb;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

/* Learning Section Improvements */
.status-display {
    margin: 15px 0;
}

.status-display label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-footer .btn {
    min-width: 100px;
}

/* Learning Actions */
.learning-actions {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.learning-actions h3 {
    margin-bottom: 15px;
    color: #2563eb;
}

.learning-actions .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Learning Stats */
.learning-stats {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.learning-stats .stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.learning-stats .stat-item {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.learning-stats .stat-item label {
    display: block;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.learning-stats .stat-item span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
}

/* Text Display for Learning Modal */
.text-display {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin-top: 5px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 200px;
    overflow-y: auto;
}

/* Learning Table Checkboxes */
.learning-entry-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.learning-entry-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

#select-all-learning {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Learning Table Improvements */
.data-table th:first-child,
.data-table td:first-child {
    width: 50px;
    text-align: center;
}

/* Logs Section Styles */
.logs-controls {
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.logs-controls .control-buttons {
    margin-bottom: 20px;
}

.logs-controls .control-buttons .btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

.logs-filters {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.logs-filters select,
.logs-filters input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.logs-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.logs-header {
    padding: 20px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
}

.logs-header h3 {
    margin: 0;
    color: #2563eb;
}

.logs-table {
    width: 100%;
    border-collapse: collapse;
}

.logs-table th,
.logs-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.logs-table td:nth-child(3) {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #666;
}

.date-range-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-range-filters input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.logs-filters input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 150px;
}

/* Logs pagination controls */
.logs-pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.logs-pagination-controls label {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.9rem;
}

.logs-pagination-controls select {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-width: 80px;
}

.logs-pagination-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.logs-pagination {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.pagination-controls .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

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

.pagination-info {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.95rem;
}

/* Knowledge base table styles */
.source-type-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.source-type-url {
    background: #d1ecf1;
    color: #0c5460;
}

.source-type-txt {
    background: #d4edda;
    color: #155724;
}

.source-type-pdf {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Knowledge base modal styles */
.modal-large {
    max-width: 90%;
    width: 90%;
}

.knowledge-details-content {
    max-height: 70vh;
    overflow-y: auto;
}

.knowledge-info .form-group {
    margin-bottom: 20px;
}

.knowledge-info label {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
    display: block;
}

.knowledge-info input,
.knowledge-info select,
.knowledge-info textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.knowledge-info textarea {
    resize: vertical;
    min-height: 200px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.knowledge-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 8px;
}

.knowledge-stats .stat-item {
    text-align: center;
}

.knowledge-stats .stat-item label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

.knowledge-stats .stat-item span {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

/* Knowledge table row hover effect */
.knowledge-row:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

.knowledge-row td {
    padding: 12px 8px;
}

.logs-table th {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    font-weight: 600;
    color: #ffffff;
}

.log-entry:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
}

.log-level-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.log-level-info {
    background: #d1ecf1;
    color: #0c5460;
}

.log-level-warning {
    background: #fff3cd;
    color: #856404;
}

.log-level-error {
    background: #f8d7da;
    color: #721c24;
}

.log-level-action {
    background: #d4edda;
    color: #155724;
}

.no-logs-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

.no-logs-message i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.no-logs-message p {
    font-size: 1.1rem;
    margin: 0;
}

/* Tooltip styles */
.tooltip-icon {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    cursor: help;
}

.tooltip-icon .fa-question-circle {
    color: #007bff;
    font-size: 0.9em;
    transition: color 0.2s ease;
}

.tooltip-icon:hover .fa-question-circle {
    color: #0056b3;
}

.tooltip-icon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    max-width: 300px;
    white-space: normal;
    text-align: center;
}

.tooltip-icon:hover::before {
    content: '';
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #ffffff;
    z-index: 1000;
}

/* Field help text */
.field-help {
    margin-top: 8px;
    color: #666;
    font-style: italic;
    padding: 8px 12px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 4px;
    border-left: 3px solid #007bff;
}

.field-help small {
    font-size: 0.85em;
    line-height: 1.4;
    display: block;
}

/* Settings form improvements */
.settings-card .form-group {
    margin-bottom: 20px;
}

.settings-card .form-group label {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ffffff;
}

.settings-card .form-group input,
.settings-card .form-group select,
.settings-card .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #0066cc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #ffffff;
}

.settings-card .form-group input:focus,
.settings-card .form-group select:focus,
.settings-card .form-group textarea:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #ffffff;
}

/* Ensure textarea is fully editable */
.settings-card .form-group textarea {
    resize: vertical;
    min-height: 80px;
    cursor: text;
    pointer-events: auto;
    user-select: auto;
}

.settings-card .form-group textarea:not([readonly]):not([disabled]) {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    color: #ffffff;
    border: 1px solid #0066cc;
}

/* Message notifications */
.message {
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.message.warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Analytics Styles */
.analytics-controls {
    margin-bottom: 20px;
    text-align: right;
}

.analytics-controls .btn {
    padding: 8px 16px;
    font-size: 14px;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.analytics-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.analytics-card h4 {
    margin: 0 0 15px 0;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

/* Common Questions Styles */
.question-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.question-item:last-child {
    border-bottom: none;
}

.question-text {
    flex: 1;
    color: #ffffff;
    font-size: 14px;
}

.question-count {
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

/* Sentiment Analysis Styles */
.sentiment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sentiment-item:last-child {
    border-bottom: none;
}

.sentiment-label {
    color: #ffffff;
    font-size: 14px;
}

.sentiment-value {
    font-weight: 600;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 40px;
    text-align: center;
}

.sentiment-item.positive .sentiment-value {
    background: #d4edda;
    color: #155724;
}

.sentiment-item.neutral .sentiment-value {
    background: #d1ecf1;
    color: #0c5460;
}

.sentiment-item.negative .sentiment-value {
    background: #f8d7da;
    color: #721c24;
}

/* Analysis info styles */
.analysis-info {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.analysis-info small {
    font-size: 11px;
    line-height: 1.3;
}

/* Responsive design for analytics */
@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .analytics-card {
        padding: 15px;
    }
}

.settings-card .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 768px) {
    .settings-card .form-row {
        grid-template-columns: 1fr;
    }
}

/* Statistics Section Styles */
.stats-controls {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.time-range-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.time-range-selector label {
    font-weight: 600;
    color: #ffffff;
}

.time-range-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    min-width: 150px;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #2563eb;
    transition: transform 0.2s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
}

.metric-icon {
    font-size: 2.5rem;
    color: #2563eb;
    margin-bottom: 15px;
    text-align: center;
}

.metric-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
    text-align: center;
}

.metric-content p {
    color: #666;
    text-align: center;
    margin-bottom: 10px;
    font-size: 14px;
}

.metric-change {
    display: block;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 12px;
    background: #e8f5e8;
    color: #28a745;
}

.metric-change.negative {
    background: #ffeaea;
    color: #dc3545;
}

.charts-container {
    margin-bottom: 30px;
}

.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-card {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
}

.chart-card h3 {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 18px;
}

.chart-card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.chart-card canvas {
    max-width: 100%;
    height: auto;
}

.detailed-stats {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.detailed-stats h3 {
    color: #ffffff;
    margin-bottom: 20px;
    font-size: 20px;
}

.stats-table-container {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.stats-table th,
.stats-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.stats-table th {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    font-weight: 600;
    color: #ffffff;
}

.stats-table tbody tr:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
}

/* Profile Section */
.profile-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.profile-info, .change-password, .twofa-section {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.profile-info h3, .change-password h3, .twofa-section h3 {
    margin-bottom: 1.5rem;
    color: #ffffff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 0.5rem;
}

.profile-details .form-group {
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 4px;
}

.profile-details label {
    font-weight: 600;
    color: #ffffff;
    display: block;
    margin-bottom: 0.25rem;
}

.profile-details span {
    color: #ffffff;
    font-size: 1.1rem;
}

.password-strength {
    margin-top: 0.5rem;
}

.strength-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.strength-bar::before {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background: #dc3545;
    transition: all 0.3s ease;
}

.strength-bar.weak::before {
    width: 25%;
    background: #dc3545;
}

.strength-bar.medium::before {
    width: 50%;
    background: #ffc107;
}

.strength-bar.strong::before {
    width: 75%;
    background: #28a745;
}

.strength-bar.very-strong::before {
    width: 100%;
    background: #20c997;
}

.strength-text {
    font-size: 0.9rem;
    color: #666;
}

.form-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Info Box */
.info-box {
    background: #e3f2fd;
    border: 1px solid #2196f3;
}

/* 2FA Section */
.twofa-section {
    grid-column: 1 / -1;
    margin-top: 2rem;
}

.twofa-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.qr-code-container {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.qr-code-container img {
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 10px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    max-width: 200px;
}

.backup-codes-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin: 1rem 0;
}

.backup-code {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 8px 12px;
    text-align: center;
    font-family: monospace;
    font-weight: 600;
    color: #ffffff;
}

#twofa-secret {
    font-family: monospace;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border: 1px solid #e1e5e9;
}

#twofa-secret + button {
    margin-left: 10px;
    padding: 8px 15px;
    font-size: 0.9rem;
}

#twofa-status {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

#twofa-status-text {
    font-weight: 600;
    color: #007bff;
}
    border-radius: 4px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1976d2;
}

.info-box i {
    color: #2196f3;
    font-size: 1.2rem;
}

.info-box span {
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Changelog Section */
.changelog-controls {
    margin-bottom: 30px;
}

.changelog-filters {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.changelog-filters select,
.changelog-filters input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
}

.changelog-filters input {
    flex: 1;
    min-width: 250px;
}

.changelog-content {
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    border: 1px solid #0066cc;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.changelog-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.changelog-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.4rem;
}

.changelog-stats {
    color: #666;
    font-size: 0.9rem;
}

.changelog-container {
    padding: 0;
}

.commit-item {
    padding: 25px 30px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.commit-item:hover {
    background-color: #f8f9fa;
}

.commit-item:last-child {
    border-bottom: none;
}

.commit-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.commit-hash {
    font-family: monospace;
    background: #f1f3f4;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #666;
}

.commit-date {
    color: #666;
    font-size: 0.9rem;
}

.commit-message {
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 10px;
    line-height: 1.4;
}

.commit-details {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.commit-author {
    color: #2563eb;
    font-weight: 500;
}

.commit-files {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #888;
}

.commit-files span {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
}

.version-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 10px;
}

.version-badge.v2-2-0 {
    background: #28a745;
    color: white;
}

.version-badge.v2-1-0 {
    background: #17a2b8;
    color: white;
}

.version-badge.v2-0-0 {
    background: #6f42c1;
    color: white;
}

.version-badge.v1-5-0 {
    background: #fd7e14;
    color: white;
}

.version-badge.v1-0-0 {
    background: #6c757d;
    color: white;
}

/* Responsive design for statistics */
@media (max-width: 1200px) {
    .chart-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .time-range-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .time-range-selector select {
        min-width: auto;
    }
}
