/* Admin Dashboard Styles */

body {
    background-color: #f8f9fa;
    padding-top: 56px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    height: calc(100vh - 56px);
    width: 250px;
    background-color: #343a40;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-menu {
    padding: 1rem 0;
}

.menu-item {
    display: block;
    padding: 12px 20px;
    color: #adb5bd;
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background-color: #495057;
    color: #fff;
    text-decoration: none;
}

.menu-item.active {
    background-color: #007bff;
    color: #fff;
    border-left-color: #0056b3;
}

.menu-item i {
    width: 20px;
    margin-right: 10px;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    padding: 2rem;
    min-height: calc(100vh - 56px);
}

.content-section {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Stats Cards */
.stat-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-icon {
    opacity: 0.8;
}

/* Tables */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Badges */
.badge {
    font-size: 0.75em;
    padding: 0.4em 0.6em;
}

/* Status indicators */
.status-online {
    color: #28a745;
}

.status-away {
    color: #ffc107;
}

.status-busy {
    color: #dc3545;
}

.status-offline {
    color: #6c757d;
}

/* Chat specific styles */
.chat-item {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: white;
    transition: box-shadow 0.3s;
}

.chat-item:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.chat-item.priority-high {
    border-left: 4px solid #dc3545;
}

.chat-item.priority-medium {
    border-left: 4px solid #ffc107;
}

.chat-item.priority-low {
    border-left: 4px solid #28a745;
}

.chat-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.wait-time {
    font-weight: bold;
}

.wait-time.urgent {
    color: #dc3545;
}

.wait-time.warning {
    color: #ffc107;
}

/* Agent status list */
.agent-status-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.agent-status-item:last-child {
    border-bottom: none;
}

.agent-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #007bff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 0.75rem;
    font-size: 0.875rem;
}

.agent-info {
    flex: 1;
}

.agent-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.agent-status {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Form styles */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Custom buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 8px;
}

/* Modal enhancements */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 10px 10px 0 0;
}

/* Utility classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cursor-pointer {
    cursor: pointer;
}

/* Custom scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #2c3e50;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #495057;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}
