/* Task Management Full Content */
.chat-container {
    position: relative;
    z-index: 1;
}

.workspace-area {
    position: relative;
    z-index: 1;
}

.task-management-full-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    background: linear-gradient(135deg, #14161C 0%, #1a1c22 100%);
}

.task-management-full-content:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    z-index: -1 !important;
}

.task-management-full-content.active {
    display: flex;
}

.task-main-container {
    flex: 1;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Task Header */
.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(114, 216, 239, 0.2);
}

.task-title {
    font-size: 28px;
    font-weight: 700;
    color: #72D8EF;
    margin: 0;
}

.task-subtitle {
    font-size: 14px;
    color: #888;
    margin: 5px 0 0 0;
}

.task-header-controls {
    display: flex;
    gap: 10px;
}

.task-control-btn {
    background: rgba(114, 216, 239, 0.1);
    border: 1px solid #72D8EF;
    border-radius: 8px;
    padding: 10px 16px;
    color: #72D8EF;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.task-control-btn:hover {
    background: #72D8EF;
    color: #14161C;
    transform: translateY(-2px);
}

/* Task Navigation */
.task-nav-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    background: rgba(20, 22, 28, 0.5);
    padding: 8px;
    border-radius: 12px;
}

.task-nav-button {
    background: transparent;
    border: none;
    color: #888;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.task-nav-button:hover {
    background: rgba(114, 216, 239, 0.1);
    color: #72D8EF;
}

.task-nav-button.active {
    background: #72D8EF;
    color: #14161C;
}

/* Task Sections */
.task-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(244, 244, 244, 0.1);
}

.section-header h2 {
    color: #F4F4F4;
    font-size: 22px;
    margin: 0;
}

.section-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-btn {
    background: rgba(114, 216, 239, 0.1);
    border: 1px solid #72D8EF;
    border-radius: 6px;
    padding: 8px 14px;
    color: #72D8EF;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    background: #72D8EF;
    color: #14161C;
}

.search-input {
    background: rgba(20, 22, 28, 0.8);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 8px 12px;
    color: #F4F4F4;
    font-size: 14px;
    width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: #72D8EF;
}

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

.stat-card {
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-card:hover {
    border-color: #72D8EF;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(114, 216, 239, 0.15);
}

.stat-icon {
    font-size: 24px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(114, 216, 239, 0.1);
    border-radius: 10px;
}

.stat-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #F4F4F4;
    margin: 0 0 5px 0;
}

.stat-content p {
    font-size: 14px;
    color: #888;
    margin: 0 0 5px 0;
}

.stat-change {
    font-size: 12px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.stat-change.positive {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.stat-change.negative {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.stat-change.neutral {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

/* Analytics Cards */
.call-analytics, .email-analytics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.analytics-card {
    background: rgba(20, 22, 28, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.analytics-card h4 {
    color: #888;
    font-size: 12px;
    text-transform: uppercase;
    margin: 0 0 8px 0;
    font-weight: 500;
}

.analytics-number {
    font-size: 24px;
    font-weight: 700;
    color: #72D8EF;
}

/* Recent Activity */
.recent-activity {
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
}

.recent-activity h3 {
    color: #F4F4F4;
    margin: 0 0 20px 0;
    font-size: 18px;
}

.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(20, 22, 28, 0.5);
    border-radius: 8px;
    transition: background 0.3s ease;
}

.activity-item:hover {
    background: rgba(114, 216, 239, 0.1);
}

.activity-icon {
    width: 32px;
    height: 32px;
    background: #72D8EF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #14161C;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 14px;
    font-weight: 500;
    color: #F4F4F4;
    margin: 0 0 2px 0;
}

.activity-description {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.activity-time {
    font-size: 11px;
    color: #666;
}

/* Quick Actions */
.quick-actions {
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px;
}

.quick-actions h3 {
    color: #F4F4F4;
    margin: 0 0 20px 0;
    font-size: 18px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.action-card {
    background: rgba(20, 22, 28, 0.8);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #F4F4F4;
}

.action-card:hover {
    border-color: #72D8EF;
    transform: translateY(-2px);
    background: rgba(114, 216, 239, 0.1);
}

.action-icon {
    font-size: 24px;
    margin-bottom: 10px;
}

.action-text {
    font-size: 14px;
    font-weight: 500;
}

/* Call Management */
.call-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: rgba(20, 22, 28, 0.5);
    padding: 6px;
    border-radius: 8px;
}

.call-tab-button {
    background: transparent;
    border: none;
    color: #888;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.call-tab-button:hover {
    background: rgba(114, 216, 239, 0.1);
    color: #72D8EF;
}

.call-tab-button.active {
    background: #72D8EF;
    color: #14161C;
}

.call-content {
    position: relative;
}

.call-tab-content {
    display: none;
}

.call-tab-content.active {
    display: block;
}

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

.call-item {
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.call-item:hover {
    border-color: #72D8EF;
    transform: translateY(-2px);
}

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

.call-time {
    font-size: 14px;
    font-weight: 500;
    color: #F4F4F4;
}

.call-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.call-status.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.call-status.failed {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.call-status.in-progress {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.call-details {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
}

.call-actions {
    display: flex;
    gap: 8px;
}

.call-action-btn {
    background: rgba(114, 216, 239, 0.1);
    border: 1px solid #72D8EF;
    border-radius: 4px;
    padding: 6px 10px;
    color: #72D8EF;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
}

.call-action-btn:hover {
    background: #72D8EF;
    color: #14161C;
}

/* Email Management */
.email-table-container {
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    border: 1px solid #444;
    border-radius: 12px;
    overflow: hidden;
}

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

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

.email-table th {
    background: rgba(20, 22, 28, 0.8);
    color: #72D8EF;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
}

.email-table td {
    color: #F4F4F4;
    font-size: 14px;
}

.email-table tr:hover {
    background: rgba(114, 216, 239, 0.05);
}

.email-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.email-status.sent {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.email-status.pending {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.email-status.failed {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

/* Navigation Tasks */
.navigation-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    border: 1px solid #444;
    border-radius: 12px;
}

.stat-item {
    flex: 1;
    text-align: center;
}

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

.stat-value {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #72D8EF;
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 15px;
}

.history-item {
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    border: 1px solid #444;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.history-item:hover {
    border-color: #72D8EF;
    transform: translateY(-2px);
}

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

.history-title {
    font-size: 14px;
    font-weight: 500;
    color: #F4F4F4;
}

.history-time {
    font-size: 12px;
    color: #888;
}

.history-details {
    font-size: 13px;
    color: #ccc;
    margin-bottom: 10px;
}

.history-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.history-status.completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.history-status.failed {
    background: rgba(244, 67, 54, 0.2);
    color: #F44336;
}

.history-status.in-progress {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

/* Analytics Section */
.time-selector {
    background: rgba(20, 22, 28, 0.8);
    border: 1px solid #444;
    border-radius: 6px;
    padding: 8px 12px;
    color: #F4F4F4;
    font-size: 14px;
}

.time-selector:focus {
    outline: none;
    border-color: #72D8EF;
}

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

.chart-card {
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px;
}

.chart-card h4 {
    color: #F4F4F4;
    margin: 0 0 15px 0;
    font-size: 16px;
}

.chart-card canvas {
    width: 100% !important;
    height: 250px !important;
}

.detailed-metrics {
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    border: 1px solid #444;
    border-radius: 12px;
    padding: 20px;
}

.detailed-metrics h4 {
    color: #F4F4F4;
    margin: 0 0 20px 0;
    font-size: 18px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.metric-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: rgba(20, 22, 28, 0.5);
    border-radius: 8px;
}

.metric-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.metric-value {
    font-size: 18px;
    font-weight: 700;
    color: #72D8EF;
}

/* Modal Styles */
.task-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.task-modal.active {
    display: block;
}

.modal-content {
    background: linear-gradient(135deg, #23252C 0%, #2a2d35 100%);
    margin: 5% auto;
    padding: 0;
    border: 1px solid #444;
    border-radius: 12px;
    width: 80%;
    max-width: 800px;
    color: #F4F4F4;
    animation: slideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #444;
}

.modal-header h3 {
    margin: 0;
    color: #72D8EF;
    font-size: 18px;
}

.close-modal {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #F4F4F4;
}

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

.transcription-entry {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    border-left: 3px solid;
}

.transcription-entry.agent {
    background: rgba(114, 216, 239, 0.1);
    border-left-color: #72D8EF;
}

.transcription-entry.user {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: #4CAF50;
}

.transcription-speaker {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.transcription-text {
    font-size: 14px;
    line-height: 1.4;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #444;
    border-top: 2px solid #72D8EF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-card {
    text-align: center;
    padding: 40px;
    color: #888;
}

.error-card {
    text-align: center;
    padding: 40px;
    color: #F44336;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .charts-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .task-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .task-nav-tabs {
        flex-wrap: wrap;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .section-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr;
    }
    
    .calls-grid,
    .history-grid {
        grid-template-columns: 1fr;
    }
    
    .call-analytics,
    .email-analytics {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .navigation-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

@media (max-width: 480px) {
    .task-main-container {
        padding: 15px;
    }
    
    .call-analytics,
    .email-analytics {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}