/* PBX Dashboard Styles */

<<<<<<< HEAD
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

=======
>>>>>>> ElishevaMerge
/* KPI Cards */
.kpi-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 1.25rem;
    height: 100%;
    display: flex;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-content {
    flex: 1;
}

.kpi-title {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.kpi-stats {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.trend.positive {
    color: #198754;
    background-color: #19875420;
}

.trend.negative {
    color: #dc3545;
    background-color: #dc354520;
}

.trend.neutral {
    color: #6c757d;
    background-color: #6c757d20;
}

.kpi-progress {
    margin-top: 0.5rem;
}

.kpi-progress small {
    display: block;
    color: #6c757d;
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

.kpi-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.kpi-badges .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-dot.active {
    background-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.2);
}

.status-dot.away {
    background-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
}

.status-dot.busy {
    background-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.status-dot.offline {
    background-color: #6c757d;
    box-shadow: 0 0 0 3px rgba(108, 117, 125, 0.2);
}

/* Tables */
.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    color: #6c757d;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
    color: #212529;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Charts */
.chart-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

/* Subtle Background Colors */
.bg-primary-subtle { background-color: #0d6efd20; }
.bg-success-subtle { background-color: #19875420; }
.bg-info-subtle { background-color: #0dcaf020; }
.bg-warning-subtle { background-color: #ffc10720; }
.bg-danger-subtle { background-color: #dc354520; }

/* Cards */
.dashboard-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.25rem;
}

.card-title {
    color: #212529;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

/* Buttons */
.btn-action {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-action:hover {
    transform: translateY(-1px);
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert i {
    font-size: 1.25rem;
}

/* Call Table */
.table th {
    font-weight: 600;
    color: var(--tech-dark);
    background: rgba(236, 239, 241, 0.5);
}

.table td {
    vertical-align: middle;
}

.table tr {
    transition: all 0.3s ease;
}

.table tr:hover {
    background: rgba(33, 150, 243, 0.05);
}

/* Call Actions */
.btn-group .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.btn-group .btn i {
    font-size: 0.875rem;
}

/* System Alerts */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.alert i {
    font-size: 1.25rem;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
}

/* Agent Status Distribution */
.agent-status {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: rgba(236, 239, 241, 0.5);
}

.agent-status i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Call Controls */
.call-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.call-controls .btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.call-controls .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.call-controls .btn i {
    font-size: 1.25rem;
}

/* Real-time Monitoring */
.monitoring-card {
    height: 400px;
    overflow: hidden;
}

.monitoring-card .card-body {
    padding: 1.5rem;
}

/* Queue Status */
.queue-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(236, 239, 241, 0.5);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.queue-status .queue-info {
    display: flex;
    flex-direction: column;
}

.queue-status .queue-metrics {
    display: flex;
    gap: 2rem;
}

.queue-status .metric {
    text-align: center;
}

.queue-status .metric-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tech-primary);
}

/* AI Insights */
.ai-insight {
    background: linear-gradient(135deg, var(--tech-primary), var(--tech-info));
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.ai-insight i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.ai-insight .insight-text {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Chat Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.message {
    margin-bottom: 1rem;
    display: flex;
}

.message.received {
    justify-content: flex-start;
}

.message.sent {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message.sent .message-content {
    background: var(--tech-primary);
    color: white;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.message.sent .message-header {
    color: rgba(255,255,255,0.9);
}

.chat-input {
    display: flex;
    padding: 1rem;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.1);
    gap: 0.5rem;
}

.chat-input .form-control {
    border-radius: 20px;
}

.chat-input .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Sentiment Indicators */
.sentiment-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.sentiment-indicator i {
    margin-right: 0.5rem;
}

.sentiment-indicator.positive {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.sentiment-indicator.negative {
    background: rgba(244, 67, 54, 0.1);
    color: #F44336;
}

.sentiment-indicator.neutral {
    background: rgba(96, 125, 139, 0.1);
    color: #607D8B;
}

/* Queue Status Indicators */
.queue-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    gap: 0.5rem;
}

.queue-status.active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.queue-status.paused {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.queue-status.offline {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Queue Priority Indicators */
.priority-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    gap: 0.5rem;
}

.priority-indicator.high {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.priority-indicator.medium {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.priority-indicator.low {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

/* SLA Progress */
.sla-progress {
    height: 8px;
    border-radius: 4px;
    background: rgba(0,0,0,0.05);
}

.sla-progress .progress-bar {
    border-radius: 4px;
    transition: width 0.3s ease;
}

.sla-progress.warning .progress-bar {
    background: var(--tech-warning);
}

.sla-progress.danger .progress-bar {
    background: var(--tech-danger);
}

/* Reports & Analytics Styles */
.metric-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.metric-icon.text-primary {
    background: rgba(var(--tech-primary-rgb), 0.1);
}

.metric-icon.text-success {
    background: rgba(40, 167, 69, 0.1);
}

.metric-icon.text-warning {
    background: rgba(255, 193, 7, 0.1);
}

.metric-icon.text-danger {
    background: rgba(220, 53, 69, 0.1);
}

.metric-content h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.metric-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.metric-trend.positive {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.metric-trend.negative {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Sentiment Analysis */
.sentiment-analysis {
    text-align: center;
}

.sentiment-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 1rem;
}

.sentiment-stat {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.sentiment-stat i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.sentiment-stat h4 {
    margin: 0;
    font-weight: bold;
}

.sentiment-stat p {
    margin: 0;
    font-size: 0.875rem;
    color: #6c757d;
}

.sentiment-stat.positive {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.sentiment-stat.neutral {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.sentiment-stat.negative {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Topics Analysis */
.topics-analysis {
    margin-top: 1rem;
}

.topic-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.topic-name {
    width: 120px;
    font-size: 0.875rem;
}

.topic-item .progress {
    flex: 1;
    height: 8px;
}

.topic-value {
    width: 48px;
    text-align: right;
    font-size: 0.875rem;
    color: #6c757d;
}

/* Agent Performance */
.rating {
    color: #ffc107;
}

.agent-performance {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.performance-score {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.875rem;
}

.performance-score.excellent {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.performance-score.good {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.performance-score.average {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.performance-score.poor {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
    .monitoring-card {
        height: 300px;
    }

    .queue-status {
        flex-direction: column;
        gap: 1rem;
    }

    .queue-status .queue-metrics {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .call-controls {
        bottom: 1rem;
        right: 1rem;
    }

    .call-controls .btn {
        width: 40px;
        height: 40px;
    }

    .chat-container {
        height: 300px;
    }

    .message-content {
        max-width: 85%;
    }

    .call-controls {
        bottom: 1rem;
        right: 1rem;
    }

    .call-control-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .ivr-flow-container {
        padding: 1rem;
    }

    .ivr-node {
        max-width: 100%;
    }

    .menu-option {
        flex-wrap: wrap;
    }

    .menu-option .form-control,
    .menu-option .form-select {
        width: 100%;
        margin-top: 0.5rem;
    }

    .chart-container {
        height: 250px;
    }

    .agent-avatars {
        display: none;
    }

    .queue-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .metric-card {
        flex-direction: column;
        text-align: center;
    }

    .metric-icon {
        margin: 0 auto;
    }

    .sentiment-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .topic-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .topic-name,
    .topic-value {
        width: 100%;
        text-align: center;
    }
}

/* PBX Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-color: #dee2e6;
    --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
    --shadow: 0 .5rem 1rem rgba(0,0,0,.15);
    --transition: all .3s ease-in-out;
}

/* Sidebar Styles */
#sidebar-wrapper {
    min-height: 100vh;
    background-color: var(--light-color);
    border-left: 1px solid var(--border-color);
    transition: var(--transition);
}

.sidebar-heading {
    padding: 1.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
}

.list-group-item {
    border: none;
    padding: 1rem 1.5rem;
    color: var(--dark-color);
    transition: var(--transition);
}

.list-group-item i {
    margin-left: 0.75rem;
    width: 20px;
    text-align: center;
}

.list-group-item:hover,
.list-group-item.active {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
}

/* KPI Cards */
.kpi-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-content {
    flex: 1;
}

.kpi-title {
    color: var(--secondary-color);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.kpi-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.trend {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.trend.positive {
    color: var(--success-color);
}

.trend.negative {
    color: var(--danger-color);
}

.details {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.kpi-progress {
    margin-top: 0.5rem;
}

.kpi-progress small {
    color: var(--secondary-color);
    font-size: 0.75rem;
}

.kpi-badges {
    display: flex;
    gap: 0.5rem;
}

/* Table Container */
.table-container {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.table-container .card-title {
    color: var(--dark-color);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.search-box {
    width: 300px;
}

.search-box .input-group {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table {
    margin: 0;
}

.table th {
    font-weight: 600;
    color: var(--secondary-color);
    border-bottom-width: 1px;
}

.table td {
    vertical-align: middle;
    color: var(--dark-color);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: 0.5rem;
}

.status-dot.active {
    background-color: var(--success-color);
}

.status-dot.inactive {
    background-color: var(--secondary-color);
}

.status-dot.busy {
    background-color: var(--warning-color);
}

/* Chat Container */
.chat-container {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.message {
    margin-bottom: 1rem;
    display: flex;
}

.message.received {
    justify-content: flex-start;
}

.message.sent {
    justify-content: flex-end;
}

.message-content {
    max-width: 70%;
    padding: 0.75rem;
    border-radius: 1rem;
    background-color: var(--light-color);
}

.message.sent .message-content {
    background-color: var(--primary-color);
    color: #fff;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

.message.sent .message-header {
    color: rgba(255, 255, 255, 0.8);
}

.message p {
    margin: 0;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.chat-input .input-group {
    border-radius: 0.5rem;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-right: -250px;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-right: 0;
    }

    .search-box {
        width: 100%;
    }

    .kpi-card {
        padding: 1rem;
    }

    .table-container {
        padding: 1rem;
    }
}

/* Tab Navigation */
.nav-tabs {
    border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition);
}

.nav-tabs .nav-link:hover {
    border: none;
    color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    border: none;
    color: var(--primary-color);
    position: relative;
}

.nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

/* Status Badges */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    font-size: 0.875rem;
}

.badge i {
    margin-left: 0.25rem;
}

/* Call Duration Warning */
.text-warning {
    color: var(--warning-color) !important;
}

/* Search Box in Extensions */
.search-box {
    width: 300px;
}

.search-box .input-group {
    border-radius: 0.5rem;
    overflow: hidden;
}

.search-box .form-control {
    border-left: none;
}

.search-box .input-group-text {
    background-color: #fff;
    border-right: none;
}

/* Table Improvements */
.table-container {
    margin-bottom: 2rem;
}

.table td {
    padding: 1rem 0.75rem;
}

.table .btn-group .btn {
    padding: 0.25rem 0.5rem;
}

/* Call Type Badges */
.call-type {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.call-type i {
    font-size: 0.75rem;
}

/* CRM Link */
.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

/* Date Picker Group */
.input-group-sm > .form-control {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Status Indicators */
.status-dot.warning {
    background-color: var(--warning-color);
}

/* Routing Badge */
.badge i {
    font-size: 0.875rem;
}

/* Extension Type Badge */
.badge.bg-primary,
.badge.bg-secondary {
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .nav-tabs .nav-link {
        padding: 0.5rem 1rem;
    }

    .search-box {
        width: 100%;
    }

    .table-responsive {
        margin: 0 -1rem;
        padding: 0 1rem;
        width: calc(100% + 2rem);
    }
}
