/* Reset y Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a1f2e 50%, #0f1419 100%);
    min-height: 100vh;
    color: #e8eaed;
}

/* Container Principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e2329 0%, #2b2f36 100%);
    border: 1px solid #e91e63;
    padding: 20px 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(233, 30, 99, 0.1);
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
}

.header-center {
    display: flex;
    justify-content: center;
}

/* View Switcher (Selector de Vista) */
.view-switcher {
    display: flex;
    gap: 8px;
    background: #1a1f2e;
    padding: 4px;
    border-radius: 8px;
    border: 1px solid #3a3f47;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.view-btn:hover {
    background: #2b2f36;
    color: #e8eaed;
}

.view-btn.active {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(233, 30, 99, 0.3);
}

.view-icon {
    font-size: 16px;
}

.view-text {
    font-size: 12px;
    letter-spacing: 0.5px;
}

.header-logo {
    height: 45px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.header h1 {
    color: #e91e63;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    margin: 0;
}

.agent-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.agent-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

#agent-name {
    font-weight: 600;
    color: #e8eaed;
    font-size: 14px;
}

.agent-status-text {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.status-badge {
    font-size: 18px;
    transition: all 0.3s ease;
}

.status-offline {
    color: #6b7280;
    text-shadow: 0 0 10px rgba(107, 114, 128, 0.4);
}

.status-available {
    color: #10b981;
    text-shadow: 0 0 15px rgba(16, 185, 129, 0.8), 0 0 25px rgba(16, 185, 129, 0.4);
    animation: pulse-green 2s ease-in-out infinite;
}

.status-busy {
    color: #ef4444;
    text-shadow: 0 0 15px rgba(239, 68, 68, 0.8), 0 0 25px rgba(239, 68, 68, 0.4);
    animation: pulse-red 1.5s ease-in-out infinite;
}

.status-aftercall {
    color: #f59e0b;
    text-shadow: 0 0 15px rgba(245, 158, 11, 0.8), 0 0 25px rgba(245, 158, 11, 0.4);
}

@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(16, 185, 129, 0.8), 0 0 25px rgba(16, 185, 129, 0.4);
    }
    50% {
        opacity: 0.7;
        text-shadow: 0 0 20px rgba(16, 185, 129, 1), 0 0 35px rgba(16, 185, 129, 0.6);
    }
}

@keyframes pulse-red {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 15px rgba(239, 68, 68, 0.8), 0 0 25px rgba(239, 68, 68, 0.4);
    }
    50% {
        opacity: 0.7;
        text-shadow: 0 0 20px rgba(239, 68, 68, 1), 0 0 35px rgba(239, 68, 68, 0.6);
    }
}
/* Main Content */
.main-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 20px;
    align-items: stretch;
    height: calc(100vh - 140px); /* Altura fija menos header */
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, #1e2329 0%, #2b2f36 100%);
    border: 1px solid #3a3f47;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.contact-section h2 {
    color: #e91e63;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.contact-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* Scrollbar personalizado para la sección de contacto */
.contact-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.contact-scroll-container::-webkit-scrollbar-track {
    background: #1a1f2e;
    border-radius: 3px;
}

.contact-scroll-container::-webkit-scrollbar-thumb {
    background: #e91e63;
    border-radius: 3px;
}

.contact-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #ff1976;
}

/* CCP Section */
.ccp-section {
    background: linear-gradient(135deg, #1e2329 0%, #2b2f36 100%);
    border: 1px solid #3a3f47;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.ccp-section h2 {
    color: #e91e63;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

#ccp-container {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    background: #0f1419;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8b949e;
    font-size: 16px;
}

/* Actions Section */
.actions-section {
    background: linear-gradient(135deg, #1e2329 0%, #2b2f36 100%);
    border: 1px solid #3a3f47;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.actions-section h2 {
    color: #e91e63;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.actions-grid {
    flex: 1;
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
    align-content: start;
}

.instructions {
    flex-shrink: 0;
    margin-top: auto;
}

/* Contact Info */
.contact-info {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid #e91e63;
    border: 1px solid #3a3f47;
}

.contact-info h3 {
    color: #e91e63;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.contact-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #e8eaed;
}

.contact-info span {
    font-weight: 600;
    color: #e91e63;
}

/* Contact Details */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #3a3f47;
}

.contact-row:last-child {
    border-bottom: none;
}

.contact-row strong {
    color: #e8eaed;
    font-size: 13px;
    min-width: 120px;
}

.contact-row span {
    color: #e91e63;
    font-size: 13px;
    text-align: right;
    font-weight: 600;
}

/* Contact Attributes */
.contact-attributes {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #3a3f47;
}

.contact-attributes h4 {
    color: #e91e63;
    margin-bottom: 10px;
    font-size: 14px;
}

#attributes-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.attribute-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    background: #0f1419;
    border-radius: 4px;
    border: 1px solid #3a3f47;
}

.attribute-key {
    color: #8b949e;
    font-size: 12px;
}

.attribute-value {
    color: #e91e63;
    font-size: 12px;
    font-weight: 600;
}

/* Contact Info Sections */
.contact-info {
    margin-bottom: 20px;
}

.contact-info h3 {
    color: #e91e63;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #3a3f47;
}

/* Contact Notes */
.contact-notes {
    margin-bottom: 15px;
}

.contact-notes h3 {
    color: #e91e63;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.notes-text {
    background: #0f1419;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #3a3f47;
    font-size: 12px;
    color: #e8eaed;
    line-height: 1.4;
    max-height: 80px;
    overflow-y: auto;
}

/* Technical Toggle */
.contact-technical {
    margin-top: 15px;
}

.technical-toggle {
    width: 100%;
    background: linear-gradient(135deg, #374151, #1f2937);
    color: #e8eaed;
    border: 1px solid #3a3f47;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.technical-toggle:hover {
    background: linear-gradient(135deg, #4b5563, #374151);
    border-color: #e91e63;
}

.technical-details {
    margin-top: 8px;
    padding: 10px;
    background: #0f1419;
    border: 1px solid #3a3f47;
    border-radius: 6px;
}

.technical-details .contact-row {
    padding: 4px 0;
    font-size: 11px;
}

.technical-details .contact-row strong {
    font-size: 11px;
    min-width: 100px;
}

.technical-details .contact-row span {
    font-size: 11px;
}

/* Action Buttons */

.action-btn {
    padding: 14px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.action-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(233, 30, 99, 0.2);
    border-color: #e91e63;
}

.action-btn:not(:disabled):active {
    transform: translateY(0);
}

/* Button Colors - Tema Trading Profesional */
.action-btn.primary {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: white;
    border: 1px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.action-btn.success {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border: 1px solid #10b981;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.action-btn.warning {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: white;
    border: 1px solid #f59e0b;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.action-btn.danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: 1px solid #ef4444;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.action-btn.info {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: white;
    border: 1px solid #06b6d4;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.action-btn.secondary {
    background: linear-gradient(135deg, #374151, #1f2937);
    color: #e91e63;
    border: 1px solid #6b7280;
    box-shadow: 0 4px 12px rgba(55, 65, 81, 0.3);
}

/* Instructions */
.instructions {
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e91e63;
    border: 1px solid #3a3f47;
}

.instructions h4 {
    color: #e91e63;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
}

.instructions ol {
    margin-left: 20px;
}

.instructions li {
    margin: 5px 0;
    font-size: 13px;
    color: #e8eaed;
}

/* Notifications */
#notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.notification {
    background: linear-gradient(135deg, #1e2329 0%, #2b2f36 100%);
    border: 1px solid #3a3f47;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-left: 4px solid #e91e63;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left-color: #51cf66;
    box-shadow: 0 8px 32px rgba(81, 207, 102, 0.2);
}

.notification.error {
    border-left-color: #ff6b6b;
    box-shadow: 0 8px 32px rgba(255, 107, 107, 0.2);
}

.notification.warning {
    border-left-color: #ffd43b;
    box-shadow: 0 8px 32px rgba(255, 212, 59, 0.2);
}

.notification h4 {
    margin-bottom: 5px;
    font-size: 14px;
    color: #e91e63;
    font-weight: 600;
}

.notification p {
    font-size: 13px;
    color: #e8eaed;
}

/* Responsive */
@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 1fr 2fr;
        gap: 15px;
    }
    
    .contact-section {
        order: 2;
    }
    
    .ccp-section {
        order: 1;
    }
    
    .actions-section {
        order: 3;
        grid-column: 1 / -1;
    }
    
    .actions-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-section,
    .ccp-section,
    .actions-section {
        order: unset;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .container {
        padding: 10px;
    }
}

@media (max-width: 768px) {
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header-left {
        flex-direction: column;
    }
    
    #ccp-container {
        height: 400px;
    }
}

/* Footer */
.footer {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    color: #6b7280;
    font-size: 12px;
    border-top: 1px solid rgba(233, 30, 99, 0.1);
}

.footer strong {
    color: #e91e63;
    font-weight: 600;
}

/* ============================================
   MODALES Y NOTIFICACIONES
   ============================================ */

/* Modal Overlay */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.modal-closing {
    animation: fadeOut 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Modal Content */
.modal-content {
    background: linear-gradient(135deg, #1e2329 0%, #2b2f36 100%);
    border: 1px solid #4b5563;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

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

/* Modal Header */
.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #374151;
}

.modal-header h3 {
    margin: 0;
    color: #e8eaed;
    font-size: 20px;
    font-weight: 600;
}

/* Modal Body */
.modal-body {
    padding: 25px;
    color: #e8eaed;
}

.modal-body p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    color: #9ca3af;
}

/* Modal Footer */
.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #374151;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Modal Buttons */
.modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-btn-cancel {
    background: #374151;
    color: #e8eaed;
}

.modal-btn-cancel:hover {
    background: #4b5563;
    transform: translateY(-2px);
}

.modal-btn-confirm {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.modal-btn-confirm:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* DateTime Picker */
.modal-datetime {
    max-width: 600px;
}

.datetime-picker {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #9ca3af;
    font-weight: 500;
    font-size: 14px;
}

.datetime-input {
    width: 100%;
    padding: 12px 16px;
    background: #1a1f2e;
    border: 2px solid #374151;
    border-radius: 8px;
    color: #e8eaed;
    font-size: 14px;
    transition: all 0.3s ease;
}

.datetime-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.datetime-textarea {
    width: 100%;
    padding: 12px 16px;
    background: #1a1f2e;
    border: 2px solid #374151;
    border-radius: 8px;
    color: #e8eaed;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 100px;
    transition: all 0.3s ease;
}

.datetime-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.datetime-textarea::placeholder {
    color: #6b7280;
}

/* Form Selects */
.form-select {
    width: 100%;
    padding: 12px 16px;
    background: #1a1f2e;
    border: 2px solid #374151;
    border-radius: 8px;
    color: #e8eaed;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

.form-select:hover {
    border-color: #4b5563;
}

.form-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-select option {
    background: #1a1f2e;
    color: #e8eaed;
    padding: 12px;
}

/* Form Input */
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: #1a1f2e;
    border: 2px solid #374151;
    border-radius: 8px;
    color: #e8eaed;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-input:hover {
    border-color: #4b5563;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
    color: #6b7280;
}

/* Form Container */
.form-container {
    margin-top: 20px;
}

.modal-form {
    max-width: 600px;
}

/* Loader Modal */
.modal-loader {
    max-width: 300px;
    text-align: center;
    padding: 40px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid rgba(233, 30, 99, 0.2);
    border-top-color: #e91e63;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.modal-loader p {
    color: #e8eaed;
    margin: 0;
}

/* ============================================
   NOTIFICACIONES
   ============================================ */

#notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

.notification {
    background: linear-gradient(135deg, #1e2329 0%, #2b2f36 100%);
    border-left: 4px solid;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInRight 0.3s ease;
}

.notification.notification-closing {
    animation: slideOutRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

.notification-success {
    border-left-color: #10b981;
    background: linear-gradient(135deg, #1e2329 0%, #1a3a2e 100%);
}

.notification-error {
    border-left-color: #ef4444;
    background: linear-gradient(135deg, #1e2329 0%, #3a1a1a 100%);
}

.notification-warning {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #1e2329 0%, #3a2e1a 100%);
}

.notification-info {
    border-left-color: #3b82f6;
    background: linear-gradient(135deg, #1e2329 0%, #1a2a3a 100%);
}

.notification-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    color: #e8eaed;
    font-size: 14px;
    line-height: 1.5;
}

.notification-close {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e8eaed;
}

/* Responsive Notifications */
@media (max-width: 768px) {
    #notifications {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .notification {
        padding: 12px 16px;
    }
}

/* ============================================
   COACHING SUPERVISOR (Reutiliza estilos existentes)
   ============================================ */

/* Indicador de estado en el botón (punto de color) */
.coaching-status-dot {
    font-size: 10px;
    margin-left: 6px;
    transition: all 0.3s ease;
}

.coaching-status-dot.status-connected {
    color: #4caf50;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.8);
    animation: pulse-green-dot 2s infinite;
}

.coaching-status-dot.status-disconnected {
    color: #6b7280;
}

.coaching-status-dot.status-active {
    color: #e91e63;
    text-shadow: 0 0 10px rgba(233, 30, 99, 0.9);
    animation: pulse-pink-dot 1s infinite;
}

@keyframes pulse-green-dot {
    0%, 100% { 
        text-shadow: 0 0 5px rgba(76, 175, 80, 0.8);
        opacity: 1;
    }
    50% { 
        text-shadow: 0 0 12px rgba(76, 175, 80, 1);
        opacity: 0.6;
    }
}

@keyframes pulse-pink-dot {
    0%, 100% { 
        text-shadow: 0 0 8px rgba(233, 30, 99, 0.8);
        opacity: 1;
    }
    50% { 
        text-shadow: 0 0 15px rgba(233, 30, 99, 1);
        opacity: 0.5;
    }
}

/* ID del agente (código resaltado) */
.coaching-id-code {
    background: #0f1419;
    color: #4caf50 !important;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    font-size: 11px;
    user-select: all;
    cursor: pointer;
    border: 1px solid #4caf50;
}

/* Botón de silenciar */
.coaching-mute-btn {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    transition: all 0.3s ease;
    margin: 8px 0;
    box-shadow: 0 2px 6px rgba(76, 175, 80, 0.3);
}

.coaching-mute-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.4);
}

.coaching-mute-btn:disabled {
    background: #555;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

/* Texto de ayuda */
.coaching-help-text {
    font-size: 10px;
    color: #9ca3af;
    text-align: center;
    line-height: 1.4;
    padding: 6px 8px;
    background: #1a1f2e;
    border-radius: 4px;
    border-left: 2px solid #4caf50;
    margin-top: 4px;
}

/* ============================================
   MODAL DE ALERTA ACW
   ============================================ */

/* Overlay del modal ACW - Más oscuro y prominente */
.acw-alert-overlay {
    background: rgba(0, 0, 0, 0.95) !important;
    z-index: 9999 !important;
    backdrop-filter: blur(8px);
}

/* Clase para ocultar temporalmente el modal ACW */
.acw-alert-overlay.acw-hidden {
    display: none;
}

/* Contenido del modal ACW */
.acw-alert-content {
    background: linear-gradient(135deg, #1a1f2e 0%, #2b2f36 100%);
    border: 3px solid #e91e63;
    border-radius: 16px;
    padding: 0;
    max-width: 600px;
    width: 85%;
    box-shadow: 0 20px 60px rgba(233, 30, 99, 0.4),
                0 0 0 1px rgba(233, 30, 99, 0.1);
    animation: acwSlideIn 0.4s ease-out;
}

/* Header del modal ACW */
.acw-alert-header {
    background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%);
    padding: 20px;
    text-align: center;
    border-radius: 13px 13px 0 0;
    border-bottom: 3px solid #f50057;
}

.acw-alert-icon {
    font-size: 48px;
    margin-bottom: 10px;
    animation: pulse 2s infinite;
}

.acw-alert-header h2 {
    color: white;
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

/* Contador de tiempo */
.acw-timer-container {
    margin-top: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-block;
}

.acw-timer-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.acw-timer {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Body del modal ACW */
.acw-alert-body {
    padding: 25px;
}

.acw-alert-message {
    font-size: 14px;
    color: #e8eaed;
    text-align: center;
    margin-bottom: 20px;
    line-height: 1.5;
}

.acw-alert-message strong {
    color: #e91e63;
    font-size: 15px;
}

/* Grid de acciones ACW */
.acw-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* Botones de acción ACW - MÁS GRANDES */
.acw-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 15px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    position: relative;
    overflow: hidden;
}

.acw-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.acw-action-btn:hover::before {
    left: 100%;
}

.acw-btn-icon {
    font-size: 36px;
    display: block;
}

.acw-btn-text {
    font-size: 14px;
    text-align: center;
    line-height: 1.2;
}

/* Colores de botones ACW */
.acw-btn-primary {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4);
}

.acw-btn-primary:hover {
    background: linear-gradient(135deg, #42a5f5 0%, #2196f3 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(33, 150, 243, 0.5);
    border-color: #64b5f6;
}

.acw-btn-success {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.4);
}

.acw-btn-success:hover {
    background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.5);
    border-color: #81c784;
}

.acw-btn-danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.4);
}

.acw-btn-danger:hover {
    background: linear-gradient(135deg, #ef5350 0%, #f44336 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(244, 67, 54, 0.5);
    border-color: #e57373;
}

.acw-btn-info {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.acw-btn-info:hover {
    background: linear-gradient(135deg, #ffa726 0%, #ff9800 100%);
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.5);
    border-color: #ffb74d;
}

/* Footer del modal ACW */
.acw-alert-footer {
    background: rgba(233, 30, 99, 0.1);
    padding: 20px;
    text-align: center;
    border-radius: 0 0 13px 13px;
    border-top: 2px solid rgba(233, 30, 99, 0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.acw-warning-message {
    color: #f59e0b;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

/* Botón de dismiss "Ya completé el estado del lead" */
.acw-dismiss-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: 2px solid #34d399;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-align: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.acw-dismiss-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.acw-dismiss-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Animaciones */
@keyframes acwSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

/* Responsive */
@media (max-width: 768px) {
    .acw-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .acw-alert-header h2 {
        font-size: 22px;
    }
    
    .acw-action-btn {
        min-height: 100px;
        padding: 20px;
    }
    
    .acw-btn-icon {
        font-size: 36px;
    }
    
    .acw-btn-text {
        font-size: 16px;
    }
}

/* ============================================
   OCULTAR SECCIONES CUANDO NO HAY LOGIN
   ============================================ */

/* Clase para ocultar secciones cuando no hay sesión */
.hidden-section {
    display: none !important;
}

/* Mensaje de login pendiente en secciones */
.section-login-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #9ca3af;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    border-radius: 8px;
    border: 2px dashed #3a3f47;
    min-height: 200px;
}

.section-login-required-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.section-login-required-text {
    font-size: 14px;
    line-height: 1.6;
    color: #9ca3af;
}

.section-login-required-text strong {
    color: #e91e63;
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}
