/* ============================================
   AI CHATBOT ADMIN DASHBOARD STYLES
   Complete CSS for WigHub AI Admin Panel
   ============================================ */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fb;
    color: #1e293b;
    line-height: 1.5;
}

/* ===== ADMIN CONTAINER ===== */
.admin-container {
    min-height: 100vh;
    background: #f5f7fb;
}

/* ===== ADMIN HEADER ===== */
.admin-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-left h1 {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.header-left h1 i {
    font-size: 28px;
    color: #667eea;
}

.header-left p {
    font-size: 14px;
    opacity: 0.8;
    margin-left: 40px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 40px;
}

.admin-info i {
    font-size: 18px;
    color: #667eea;
}

.admin-info span {
    font-weight: 500;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-logout {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    padding: 15px 30px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .separator {
    margin: 0 8px;
    color: #94a3b8;
}

/* ===== AI ADMIN CONTAINER ===== */
.ai-admin-container {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== STATS GRID ===== */
.ai-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.ai-stat-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border-left: 4px solid;
    position: relative;
    overflow: hidden;
}

.ai-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.ai-stat-card.sessions { border-color: #3498db; }
.ai-stat-card.questions { border-color: #2ecc71; }
.ai-stat-card.unanswered { border-color: #e74c3c; }
.ai-stat-card.knowledge { border-color: #f39c12; }

.ai-stat-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #1e293b;
}

.ai-stat-label {
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== TABS ===== */
.ai-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 5px;
}

.ai-tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    position: relative;
}

.ai-tab-btn i {
    font-size: 16px;
}

.ai-tab-btn:hover {
    background: #f1f5f9;
    color: #667eea;
}

.ai-tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Notification Badge */
.notification-badge {
    background: #e74c3c;
    color: white;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    animation: pulseBadge 1.5s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* ===== TAB CONTENT ===== */
.ai-tab-content {
    display: none;
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease;
}

.ai-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== FILTER BAR ===== */
.ai-filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.ai-filter-bar input,
.ai-filter-bar select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.ai-filter-bar input:focus,
.ai-filter-bar select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.ai-filter-bar input {
    flex: 1;
    min-width: 250px;
}

/* ===== KNOWLEDGE BASE GRID ===== */
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.knowledge-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid #eef2ff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.knowledge-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #e0e7ff;
}

.knowledge-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.knowledge-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.knowledge-usage {
    font-size: 12px;
    color: #64748b;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 20px;
}

.knowledge-question {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.knowledge-question i {
    margin-top: 2px;
    font-size: 18px;
}

.knowledge-answer {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.knowledge-answer i {
    margin-top: 2px;
    font-size: 14px;
}

.knowledge-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #eef2ff;
}

.knowledge-date {
    font-size: 11px;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 5px;
}

.knowledge-actions {
    display: flex;
    gap: 8px;
}

.btn-icon {
    background: transparent;
    border: none;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-icon.edit {
    color: #3b82f6;
}

.btn-icon.edit:hover {
    background: #eff6ff;
}

.btn-icon.delete {
    color: #ef4444;
}

.btn-icon.delete:hover {
    background: #fef2f2;
}

/* ===== UNANSWERED QUESTIONS GRID ===== */
.unanswered-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.unanswered-card {
    background: #ffffff;
    border: 1px solid #fee2e2;
    border-radius: 16px;
    padding: 20px;
    transition: all 0.2s;
    background: #fffaf5;
}

.unanswered-card:hover {
    border-color: #fecaca;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.unanswered-count {
    display: inline-block;
    background: #fee2e2;
    color: #dc2626;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.unanswered-question {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.unanswered-question i {
    color: #f97316;
    margin-top: 2px;
}

.unanswered-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 16px;
}

.unanswered-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.unanswered-actions {
    display: flex;
    gap: 12px;
}

.btn-teach {
    padding: 8px 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-teach:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-ignore {
    padding: 8px 16px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-ignore:hover {
    background: #e2e8f0;
}

/* ===== TEACH FORM ===== */
.teach-form {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 28px;
    border-radius: 24px;
    margin-bottom: 30px;
    border: 1px solid #e2e8f0;
}

.teach-form h3 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.teach-form .form-group {
    margin-bottom: 20px;
}

.teach-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #334155;
}

.teach-form input,
.teach-form select,
.teach-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 14px;
    transition: all 0.3s;
    font-family: inherit;
}

.teach-form input:focus,
.teach-form select:focus,
.teach-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.teach-form textarea {
    min-height: 120px;
    resize: vertical;
}

.teach-form small {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}

.save-teach-btn {
    padding: 12px 28px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

.save-teach-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.4);
}

/* Quick Teach List */
.quick-teach-list {
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
}

.quick-teach-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eef2ff;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}

.quick-teach-item:hover {
    background: #f8fafc;
    padding-left: 24px;
}

.quick-teach-item i {
    color: #f97316;
}

/* ===== ANALYTICS STYLES ===== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    border: 1px solid #eef2ff;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-card.unanswered .stat-icon { color: #e74c3c; }
.stat-card.knowledge .stat-icon { color: #f39c12; }

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: #1e293b;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    margin-top: 5px;
}

.keywords-cloud {
    background: #f8fafc;
    padding: 20px;
    border-radius: 16px;
    text-align: center;
    min-height: 200px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.keyword-tag {
    display: inline-block;
    background: white;
    padding: 6px 12px;
    border-radius: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    cursor: default;
    border: 1px solid #e2e8f0;
}

.keyword-tag:hover {
    transform: scale(1.05);
    border-color: #667eea;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.stats-table th,
.stats-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eef2ff;
}

.stats-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.category-usage {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.category-item {
    width: 100%;
}

.category-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 13px;
}

.category-name {
    padding: 2px 10px;
    border-radius: 20px;
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.category-count {
    color: #64748b;
}

.category-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.category-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

/* ===== LIVE SUPPORT STYLES ===== */
.live-support-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 10px;
}

.support-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    border: 1px solid #eef2ff;
    transition: all 0.2s;
}

.support-card.waiting {
    border-left: 4px solid #f97316;
}

.support-card.active {
    border-left: 4px solid #10b981;
}

.support-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.support-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.support-user i {
    font-size: 24px;
    color: #667eea;
}

.support-user strong {
    font-size: 16px;
}

.user-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.badge-client { background: #e3f2fd; color: #1976d2; }
.badge-braider { background: #f3e5f5; color: #7b1fa2; }
.badge-admin { background: #ffeb3b; color: #333; }
.badge-guest { background: #e0e0e0; color: #666; }

.agent-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.support-question {
    font-size: 14px;
    color: #475569;
    margin-bottom: 12px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 10px;
    font-style: italic;
}

.support-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.support-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-join, .btn-open {
    padding: 8px 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-join {
    background: #f97316;
    color: white;
}

.btn-join:hover {
    background: #ea580c;
    transform: translateY(-1px);
}

.btn-open {
    background: #3b82f6;
    color: white;
}

.btn-open:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* Live Chat Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 24px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Live Chat Container */
.live-chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 450px;
}

.live-chat-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eef2ff;
}

.live-chat-header h3 {
    margin-bottom: 10px;
    color: #1e293b;
}

.chat-info {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #64748b;
}

.chat-info span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.live-chat-messages {
    flex: 1;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: #f8fafc;
    border-radius: 16px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    padding: 12px 16px;
    border-radius: 16px;
    max-width: 85%;
    animation: messageSlideIn 0.2s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    align-self: flex-start;
    background: white;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chat-message.admin {
    align-self: flex-end;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.system {
    align-self: center;
    background: #e2e8f0;
    color: #475569;
    font-size: 12px;
    padding: 6px 12px;
    max-width: 90%;
    text-align: center;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 11px;
    gap: 12px;
}

.chat-message.user .chat-message-header {
    color: #64748b;
}

.chat-message.admin .chat-message-header {
    color: rgba(255, 255, 255, 0.8);
}

.chat-message-content {
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.no-messages {
    text-align: center;
    color: #94a3b8;
    padding: 40px;
}

.live-chat-input {
    display: flex;
    gap: 12px;
    padding-top: 15px;
    border-top: 1px solid #eef2ff;
}

.live-chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 30px;
    font-size: 14px;
    transition: all 0.3s;
}

.live-chat-input input:focus {
    outline: none;
    border-color: #667eea;
}

.live-chat-input button {
    padding: 0 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.live-chat-input button:hover {
    transform: scale(1.02);
}

.live-chat-input .btn-end {
    background: #ef4444;
}

.live-chat-input .btn-end:hover {
    background: #dc2626;
}

/* ===== NOTIFICATION ===== */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 14px 24px;
    border-radius: 12px;
    color: white;
    font-weight: 500;
    z-index: 10001;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.notification.success {
    background: #10b981;
}

.notification.error {
    background: #ef4444;
}

.notification.info {
    background: #3b82f6;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f8fafc;
    border-radius: 24px;
    border: 2px dashed #e2e8f0;
}

.empty-state i {
    font-size: 64px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: #475569;
}

.empty-state p {
    color: #94a3b8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        text-align: center;
    }
    
    .header-left h1 {
        justify-content: center;
    }
    
    .header-left p {
        margin-left: 0;
    }
    
    .ai-admin-container {
        padding: 20px;
    }
    
    .ai-tab-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .knowledge-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .live-chat-input {
        flex-wrap: wrap;
    }
    
    .live-chat-input button {
        padding: 10px 16px;
    }
}

@media (max-width: 480px) {
    .ai-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .knowledge-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .unanswered-actions {
        flex-direction: column;
    }
    
    .support-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .ai-tabs,
    .ai-filter-bar,
    .knowledge-actions,
    .unanswered-actions,
    .btn,
    .modal,
    .notification {
        display: none !important;
    }
    
    .ai-tab-content {
        display: block !important;
    }
    
    .knowledge-card {
        break-inside: avoid;
    }
}

/* Ensure chatbot stays on right side when scrolling */
#wighub-ai-chatbot {
    position: fixed;
    bottom: 0;
    right: 0;
    left: auto;
    top: auto;
    z-index: 9999;
    pointer-events: none;
}

#wighub-ai-chatbot .ai-chat-toggle,
#wighub-ai-chatbot .ai-chat-window {
    pointer-events: auto;
}

/* Override any conflicting styles */
.ai-chat-toggle,
.ai-chat-window {
    position: fixed !important;
    left: auto !important;
    right: auto !important;
}