/* Sidebar */
#sidebar {
    width: 240px;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

#main-content {
    margin-left: 240px;
    min-height: 100vh;
    background: #f5f7fa;
}

#sidebar .nav-link:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.08);
    border-radius: 6px;
}

#sidebar .nav-link.active {
    color: #fff !important;
    background: rgba(255,255,255,0.12);
    border-radius: 6px;
}

/* Chat */
.chat-container {
    max-height: calc(100vh - 320px);
    min-height: 300px;
    overflow-y: auto;
    padding: 1rem;
}

.chat-message {
    max-width: 75%;
    margin-bottom: 1rem;
}

.chat-message.user-message {
    margin-right: auto;
}

.chat-message.admin-message {
    margin-left: auto;
}

.chat-message .bubble {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    position: relative;
    word-wrap: break-word;
}

.chat-message.user-message .bubble {
    background: #e9ecef;
    border-bottom-left-radius: 4px;
}

.chat-message.admin-message .bubble {
    background: #0d6efd;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-message .meta {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 4px;
}

.chat-message.admin-message .meta {
    text-align: right;
}

/* Attachments */
.attachment-preview {
    display: inline-block;
    margin: 4px;
    position: relative;
}

.attachment-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 8px;
    object-fit: cover;
}

.attachment-file {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    margin: 4px;
    text-decoration: none;
    color: inherit;
}

.attachment-file:hover {
    background: rgba(0,0,0,0.08);
}

/* Drop zone */
.drop-zone {
    border: 2px dashed transparent;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.drop-zone.drag-over {
    border-color: #0d6efd;
    background: rgba(13,110,253,0.05);
}

.upload-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
}

.upload-preview-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #e9ecef;
    border-radius: 20px;
    font-size: 0.85rem;
}

.upload-preview-item .remove-file {
    cursor: pointer;
    color: #dc3545;
    font-weight: bold;
}

/* Tracking badges */
.tracking-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}

/* Cards */
.stat-card {
    border: none;
    border-radius: 12px;
    transition: transform 0.15s ease;
}

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

/* Ticket list */
.ticket-row {
    transition: background 0.15s ease;
    cursor: pointer;
}

.ticket-row:hover {
    background: #f0f4ff;
}

/* Integration cards */
.integration-card {
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: box-shadow 0.2s ease;
}

.integration-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Report */
.report-content {
    line-height: 1.7;
}

.report-content h1, .report-content h2, .report-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.report-content ul, .report-content ol {
    padding-left: 1.5rem;
}

/* Mobile */
@media (max-width: 991.98px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.show {
        transform: translateX(0);
    }
    #main-content {
        margin-left: 0;
    }
    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        display: none;
    }
    .sidebar-backdrop.show {
        display: block;
    }
}

/* Public form */
.public-form-container {
    max-width: 600px;
    margin: 2rem auto;
}
