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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #43d674 0%, #2bd5eb 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.6s ease-out;
}

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

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.form-group input {
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    background: #fdf2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #34495e;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header i {
    font-size: 1.5rem;
    color: #3498db;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.sidebar-menu {
    flex: 1;
    list-style: none;
    padding: 20px 0;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-link:hover {
    background: #34495e;
    color: white;
}

.menu-item.active .menu-link {
    background: #3498db;
    color: white;
    border-left-color: #2980b9;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #34495e;
}

.logout-btn {
    width: 100%;
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.3s ease;
}

.logout-btn:hover {
    background: #c0392b;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f8f9fa;
}

.main-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.main-header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.section-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e1e5e9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.section-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
    transform: translateY(-1px);
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-info:hover {
    background: #2980b9;
    transform: translateY(-1px);
}

/* Bot Cards */
.bots-list {
    padding: 20px 30px;
}

.bot-card {
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}


.bot-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: white;
    transition: background-color 0.2s ease;
}

.bot-header:hover {
    background: #f8f9fa;
}

.bot-info {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
}

.bot-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.bot-id {
    font-size: 0.9rem;
    color: #6c757d;
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.bot-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px; /* Ancho mínimo para alinear todos los indicadores */
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    top: 0; /* Asegurar que esté alineado verticalmente */
}

.status-indicator.connected {
    background: #27ae60;
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.5);
}

.status-indicator.disconnected {
    background: #e74c3c;
}

.status-indicator.connecting {
    background: #f39c12;
    animation: pulse 2s infinite;
}

.status-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    white-space: nowrap; /* Evitar que el texto se rompa en líneas */
    min-width: 80px; /* Ancho mínimo para el texto */
}

.bot-header i.fa-chevron-down {
    font-size: 14px;
    color: #6c757d;
    transition: transform 0.3s ease;
    margin-left: 16px;
}

.bot-header i.fa-chevron-down.rotated {
    transform: rotate(180deg);
}

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

.bot-details h3 {
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.bot-details p {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.bot-content {
    background: white;
    border-top: 1px solid #e1e5e9;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.bot-card.expanded .bot-content {
    max-height: 600px;
    padding: 24px;
}

.bot-details {
    margin-bottom: 24px;
}

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

.detail-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.detail-item:hover {
    background: #e9ecef;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.detail-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.detail-icon i {
    font-size: 16px;
    color: #6c757d;
}

.detail-icon i.connected {
    color: #27ae60;
}

.detail-icon i.disconnected {
    color: #e74c3c;
}

.detail-info {
    flex: 1;
    min-width: 0;
}

.detail-info .label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-info .value {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    word-break: break-word;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
}

.bot-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: scale(1);
    transition: transform 0.3s ease;
}

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

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #7f8c8d;
    padding: 5px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

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

.modal-body {
    padding: 30px;
    text-align: center;
}

.qr-container {
    margin-bottom: 20px;
}

.qr-loading {
    padding: 40px;
    color: #7f8c8d;
}

.qr-loading i {
    font-size: 2rem;
    margin-bottom: 15px;
}

.qr-code {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pairing-code-display {
    text-align: center;
    padding: 30px 20px;
    margin: 20px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.pairing-code-text {
    font-family: 'Courier New', 'Monaco', 'Menlo', monospace;
    font-size: 36px;
    font-weight: bold;
    letter-spacing: 6px;
    color: #007bff;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 123, 255, 0.2);
}

.pairing-mode-toggle {
    margin-bottom: 10px;
    display: block;
    text-align: center;
    cursor: pointer;
    color: #007bff;
    text-decoration: underline;
    font-size: 14px;
    padding: 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pairing-mode-toggle:hover {
    background-color: #f8f9fa;
    text-decoration: none;
}

.qr-instructions {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.qr-instructions p {
    margin-bottom: 8px;
    color: #555;
    font-size: 0.9rem;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 1px solid #e1e5e9;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: #3498db;
}

.loading-spinner i {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
    word-wrap: break-word;
}

.notification-success {
    background: #27ae60;
    color: white;
}

.notification-error {
    background: #e74c3c;
    color: white;
}

.notification-info {
    background: #3498db;
    color: white;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-header {
        padding: 15px 20px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .section-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .bot-header {
        padding: 15px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .detail-item {
        padding: 12px;
    }
    
    .bot-content {
        padding: 16px !important;
    }
    
    .bot-card.expanded .bot-content {
        max-height: 2000px; /* Large enough to show all content on mobile */
        overflow-y: visible; /* Allow content to expand fully */
    }
    
    .modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .bot-header {
        padding: 12px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .bot-info {
        width: 100%;
        justify-content: space-between;
    }
    
    .bot-status {
        margin-top: 8px;
        min-width: 100px; /* Reducir en móviles */
    }
    
    .status-text {
        min-width: 70px; /* Reducir en móviles */
        font-size: 0.8rem;
    }
    
    .detail-item {
        padding: 10px;
    }
    
    .detail-icon {
        width: 32px;
        height: 32px;
    }
    
    .detail-icon i {
        font-size: 14px;
    }
    
    .bot-card.expanded .bot-content {
        max-height: 2000px; /* Large enough to show all content on small mobile */
        overflow-y: visible; /* Allow content to expand fully */
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .main-content {
        width: 100%;
    }
    
    .bot-stats {
        grid-template-columns: 1fr;
    }
}

/* New Modal Styles */
.form-help {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.warning-box {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.warning-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.warning-box i {
    color: #f39c12;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.warning-box h4 {
    color: #856404;
    margin: 0;
    font-size: 1.1rem;
}

.warning-box p {
    color: #856404;
    margin: 0;
    line-height: 1.5;
}

.warning-box ul {
    color: #856404;
    margin: 0;
    padding-left: 20px;
    line-height: 1.6;
    text-align: left;
}

.warning-box li {
    margin-bottom: 8px;
}

.warning-box li:last-child {
    margin-bottom: 0;
}

.danger-box {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.danger-box h4 {
    color: #721c24;
    margin-bottom: 10px;
}

.danger-box p {
    color: #721c24;
    margin-bottom: 10px;
}

.danger-box ul {
    color: #721c24;
    text-align: left;
    width: fit-content;
    margin: auto;
}

.danger-box li {
    margin-bottom: 5px;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
    transform: translateY(-1px);
}

.btn-danger:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Form Group Styles */
.form-group {
    margin-bottom: 20px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #43d674;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* Error Message Styles */
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 14px;
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

.notification.success {
    background-color: #28a745;
}

.notification.error {
    background-color: #dc3545;
}

.notification.info {
    background-color: #17a2b8;
}

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

/* Queue Info Styles */
.queue-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.queue-info .value {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.queue-info .timestamp {
    font-size: 12px;
    color: #6c757d;
}

.btn-icon {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    margin-left: auto;
}

.btn-icon:hover {
    background-color: #e9ecef;
    color: #495057;
}

/* Queue Details Modal Styles */
.queue-details-modal {
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.queue-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-item .label {
    font-size: 12px;
    color: #6c757d;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-item .value {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.summary-item .value.sent {
    color: #28a745;
}

.summary-item .value.failed {
    color: #dc3545;
}

.summary-item .value.completed {
    color: #28a745;
}

.summary-item .value.processing {
    color: #ffc107;
}

.summary-item .value.pending {
    color: #6c757d;
}

.summary-item .value.failed {
    color: #dc3545;
}

.messages-list {
    margin-top: 24px;
}

.messages-list h4 {
    margin-bottom: 16px;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
}

.messages-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
}

.message-item {
    padding: 16px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item:hover {
    background-color: #f8f9fa;
}

.message-item.sent {
    border-left: 4px solid #28a745;
}

.message-item.failed {
    border-left: 4px solid #dc3545;
}

.message-item.pending {
    border-left: 4px solid #ffc107;
}

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

.phone-number {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

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

.status-badge.sent {
    background-color: #d4edda;
    color: #155724;
}

.status-badge.failed {
    background-color: #f8d7da;
    color: #721c24;
}

.status-badge.pending {
    background-color: #fff3cd;
    color: #856404;
}

.message-content {
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
    word-wrap: break-word;
}

.message-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #6c757d;
}

.message-id {
    font-family: 'Courier New', monospace;
    background-color: #e9ecef;
    padding: 2px 6px;
    border-radius: 4px;
}

.message-item .error-message {
    margin-top: 8px;
    padding: 8px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    font-size: 12px;
    border-left: 3px solid #dc3545;
}

/* Country Selector Styles */
.phone-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.phone-input-field {
    width: 100%;
    padding: 12px 16px 12px 72px !important;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.3s ease;
    background-color: white;
}

.phone-input-field:focus {
    outline: none;
    border-color: #43d674;
    box-shadow: 0 0 0 3px rgba(67, 214, 116, 0.1);
}

.phone-input-field:hover {
    border-color: #43d674;
}

.country-selector {
    position: absolute;
    left: 2px;
    top: 2px;
    bottom: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 80px;
    height: 40px;
}

.country-selector select {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 11;
}

/* Show country options in dropdown */
.country-selector select option {
    display: block;
    padding: 8px 12px;
    background: white;
    color: #2c3e50;
    font-size: 14px;
    border: 1px solid #e1e5e9;
}

.country-selector select:focus {
    outline: none;
}

.country-display {
    display: flex;
    align-items: center;
    gap: 4px;
    pointer-events: none;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 5px 0 0 5px;
    padding: 4px 8px;
    height: 100%;
    min-height: 40px;
    box-sizing: border-box;
}

.country-flag {
    font-size: 16px;
    line-height: 1;
}

.country-code {
    font-size: 12px;
    font-weight: 700;
    color: #2c3e50;
    min-width: 30px;
}

.country-selector:hover .country-display {
    background-color: #e9ecef;
    border-color: #dee2e6;
}


/* Responsive adjustments for queue details modal */
@media (max-width: 768px) {
    .queue-details-modal {
        width: 95%;
        margin: 10px;
    }
    
    .queue-summary {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }
    
    .messages-container {
        max-height: 300px;
    }
    
    .message-item {
        padding: 12px;
    }
    
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .message-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .phone-input-field {
        padding-left: 70px;
    }
    
    .country-selector {
        left: 0;
    }
    
    .country-selector select {
        font-size: 11px;
        min-width: 40px;
        padding-right: 18px;
    }
}

/* Numbers Modal Styles */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin: 2px;
}

.badge-silenced {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
}

.badge-blocked {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #dc2626;
}

.numbers-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.summary-item i {
    font-size: 1rem;
}

.summary-item i.fa-volume-mute {
    color: #f59e0b;
}

.summary-item i.fa-ban {
    color: #dc2626;
}

.numbers-table {
    margin-top: 1rem;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.numbers-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
}

.numbers-table th,
.numbers-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.numbers-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.numbers-table td {
    font-size: 0.875rem;
    color: #4b5563;
}

.numbers-table tbody tr:hover {
    background-color: #f9fafb;
}

.numbers-table tbody tr:last-child td {
    border-bottom: none;
}

.actions {
    white-space: nowrap;
}

.actions .btn {
    margin: 0 2px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6b7280;
    font-style: italic;
}

.loading-state {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.loading-state i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Detail actions button */
.detail-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.detail-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    min-width: auto;
}

/* Badge spacing in detail item */
.detail-item .value .badge {
    margin-right: 0.25rem;
}

.detail-item .value .badge:last-child {
    margin-right: 0;
}
