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

/* Estilos para modal de información de números */
.number-info-section {
    margin-bottom: 20px;
}

.info-subsection {
    margin-bottom: 20px;
    border-left: 3px solid #4CAF50;
    padding-left: 15px;
}

.info-subsection h5 {
    color: #4CAF50;
    margin-bottom: 10px;
    font-size: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item span {
    font-size: 14px;
    color: #333;
    word-break: break-word;
}

/* Responsive para grid de información */
@media (max-width: 480px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Estilos para badges de estado */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.status-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-expired {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Mejorar estilos de modales en general */
.modal-content {
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
    padding-bottom: 15px;
}

.modal-footer {
    position: sticky;
    bottom: 0;
    background: white;
    border-top: 1px solid #eee;
    margin-top: 20px;
    padding-top: 15px;
}

/* Estilos específicos para números clickeables */
.number-btn {
    cursor: pointer;
    transition: all 0.2s ease;
}

.number-btn.sold:hover,
.number-btn.assigned:hover,
.number-btn.confirmed:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Contenedor principal */
.container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header */
.header {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    padding: 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

/* Navegación por pestañas */
.nav-tabs {
    display: flex;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    overflow-x: auto;
}

.tab {
    flex: 1;
    min-width: 80px;
    padding: 15px 10px;
    text-align: center;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    white-space: nowrap;
}

.tab.active {
    background: #4CAF50;
    color: white;
}

.tab-content {
    display: none;
    padding: 20px;
}

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

/* Formularios */
.config-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input, 
.form-group textarea, 
.form-group select {
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus, 
.form-group textarea:focus, 
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Botones */
.btn {
    padding: 15px 25px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

.btn:hover {
    background: #45a049;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 8px 15px;
    font-size: 14px;
    margin: 2px;
}

.btn-warning {
    background: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-info {
    background: #17a2b8;
}

.btn-info:hover {
    background: #138496;
}

/* Botones específicos para números - colores consistentes */
.btn-purchase {
    background: #4CAF50 !important; /* Verde - igual que números vendidos */
    color: white;
}

.btn-purchase:hover {
    background: #45a049 !important;
}

.btn-reserve {
    background: #fff3cd !important; /* Amarillo - igual que números reservados */
    color: #000;
}

.btn-reserve:hover {
    background: #e0a800 !important;
}

.btn-assign {
    background: #ffc107 !important; /* Amarillo - igual que números asignados */
    color: #000;
}

.btn-assign:hover {
    background: #e0a800 !important;
}

/* Grid de números */
.numbers-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 20px 0;
}

.number-btn {
    aspect-ratio: 1;
    border: 2px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.number-btn.available {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.number-btn.available:hover {
    background: #c3e6cb;
    transform: scale(1.05);
}

.number-btn.selected {
    background: #4CAF50;
    border-color: #45a049;
    color: white;
    transform: scale(1.05);
}

.number-btn.sold {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
    cursor: not-allowed;
}

.number-btn.reserved {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
    position: relative;
}

.number-btn.reserved::after {
    content: "⏰";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
}

.number-btn.assigned {
    background: #ffc107;
    border-color: #e0a800;
    color: #000;
    position: relative;
    font-weight: 700;
}

.number-btn.assigned::after {
    content: "📋";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
}

.number-btn.confirmed {
    background: #007bff;
    border-color: #0056b3;
    color: white;
    position: relative;
    font-weight: 700;
}

.number-btn.confirmed::after {
    content: "✓";
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 8px;
    font-weight: bold;
}

/* Selección de números */
.selection-summary {
    background: #e7f3ff;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.selection-summary h3 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.selected-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 10px 0;
}

.selected-number {
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.total-price {
    font-size: 18px;
    font-weight: 600;
    color: #4CAF50;
    text-align: right;
}

/* Modales */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background: white;
    margin: 0 auto;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    border-radius: 10px;
    position: relative;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #aaa;
}

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

.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirmation-content {
    background: white;
    padding: 30px 20px;
    margin: 20px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.success-icon {
    font-size: 48px;
    color: #4CAF50;
    margin-bottom: 15px;
}

/* WhatsApp */
.whatsapp-btn {
    background: #25D366;
    color: white;
    padding: 15px 25px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    margin: 10px 5px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.whatsapp-btn:hover {
    background: #128C7E;
}

/* Estadísticas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.stat-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

/* Listas de ventas y administración */
.sales-list {
    max-height: 400px;
    overflow-y: auto;
}

.sale-item {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
}

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

.sale-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
}

.sale-number {
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
}

.payment-status {
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.payment-status.paid {
    background: #d4edda;
    color: #155724;
}

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

/* Iconos de métodos de pago mejorados */
.payment-icon {
    display: inline-block;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: 4px;
    margin-right: 5px;
}

.payment-icon.efectivo {
    background: #d4edda;
    color: #155724;
}

.payment-icon.transferencia-paid {
    background: #cce7ff;
    color: #004085;
}

.payment-icon.transferencia-pending {
    background: #fff3cd;
    color: #856404;
}

.admin-actions {
    margin: 15px 0;
}

/* Sugerencias de compradores */
.buyer-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.buyer-suggestion {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}

.buyer-suggestion:hover {
    background: #f8f9fa;
}

.buyer-suggestion:last-child {
    border-bottom: none;
}

.buyer-suggestion .buyer-name {
    font-weight: 600;
    color: #333;
}

.buyer-suggestion .buyer-details {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.buyer-consolidation {
    background: #e7f3ff;
    border: 1px solid #4CAF50;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.buyer-consolidation h4 {
    color: #4CAF50;
    margin-bottom: 10px;
}

.buyer-stats {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

/* Búsqueda y filtros */
.search-box {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.filter-section {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

.filter-row label {
    min-width: 80px;
    font-weight: 600;
    font-size: 14px;
}

.filter-row input,
.filter-row select {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Leyenda de colores */
.legend {
    display: flex;
    justify-content: space-around;
    margin: 15px 0;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 15px;
    height: 15px;
    border-radius: 3px;
    border: 1px solid #ddd;
}

/* Setup inicial */
.setup-needed {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.setup-needed h3 {
    margin-bottom: 10px;
}

/* Reportes */
.report-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.report-title {
    font-size: 18px;
    font-weight: 600;
    color: #4CAF50;
}

.report-summary {
    background: white;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

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

.summary-stat {
    text-align: center;
    padding: 10px;
    background: #e7f3ff;
    border-radius: 8px;
}

.summary-stat .number {
    font-size: 20px;
    font-weight: 600;
    color: #4CAF50;
}

.summary-stat .label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.report-table th,
.report-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 14px;
}

.report-table th {
    background: #4CAF50;
    color: white;
    font-weight: 600;
}

.report-table tr:nth-child(even) {
    background: #f2f2f2;
}

/* Backup */
.backup-section {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.backup-warning {
    color: #856404;
    font-weight: 600;
    margin-bottom: 10px;
}

.last-backup {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

/* Responsive Design */
@media (max-width: 320px) {
    .numbers-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-tabs {
        font-size: 12px;
    }

    .tab {
        padding: 12px 8px;
    }

    .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-row label {
        min-width: auto;
        margin-bottom: 5px;
    }
}

/* Scrollbars personalizados */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 🛡️ NUEVOS ESTILOS PARA VALIDACIÓN DE CONFLICTOS */

/* Estado de error en pagos */
.payment-status.error {
    background: #f8d7da;
    color: #721c24;
    font-weight: 600;
}

/* Números en conflicto (vendidos duplicados) */
.sale-number.conflict {
    background: #dc3545;
    color: white;
    animation: pulse 1.5s infinite;
    font-weight: bold;
    border: 2px solid #fff;
}

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

/* Compradores recurrentes */
.repeat-buyer {
    border-left: 4px solid #4CAF50 !important;
    background: #f0fff0;
}

.repeat-badge {
    background: #4CAF50;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px #4CAF50; }
    to { box-shadow: 0 0 15px #4CAF50, 0 0 20px #4CAF50; }
}

/* Botones deshabilitados por conflicto */
.btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn:disabled:hover {
    background: #6c757d;
    transform: none;
}

/* Alertas de conflicto */
.conflict-alert {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: 600;
}

.conflict-alert::before {
    content: "⚠️ ";
    font-weight: bold;
}

/* Notificaciones mejoradas */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

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

.notification.success {
    background: #4CAF50;
}

.notification.error {
    background: #f44336;
}

.notification.warning {
    background: #ff9800;
    color: #333;
}

/* ========================================= */
/* ESTILOS PARA ASIGNACIONES */
/* ========================================= */

/* Secciones de asignación */
.assignment-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.assignment-section h3 {
    color: #4CAF50;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Formulario de asignación */
.assignment-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.assignment-summary {
    background: #e7f3ff;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.assignment-summary h4 {
    color: #007bff;
    margin-bottom: 10px;
}

/* Lista de asignaciones */
.assignments-list {
    max-height: 500px;
    overflow-y: auto;
}

.assignment-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s;
}

.assignment-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #4CAF50;
}

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

.assignment-seller {
    flex: 1;
}

.assignment-seller strong {
    font-size: 16px;
    color: #333;
}

.seller-phone {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 2px;
}

.assignment-status {
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    min-width: 80px;
}

.assignment-status.assigned {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.assignment-status.paid {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.assignment-status.confirmed {
    background: #cce7ff;
    color: #004085;
    border: 1px solid #99d6ff;
}

.assignment-details {
    margin: 10px 0;
}

.assignment-numbers {
    font-size: 14px;
    margin-bottom: 5px;
    word-break: break-all;
}

.assignment-total {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
    margin-bottom: 5px;
}

.assignment-deadline {
    font-size: 12px;
    color: #856404;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 5px;
}

.assignment-notes {
    font-size: 12px;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    padding: 5px 8px;
    border-radius: 4px;
    margin-top: 5px;
}

.assignment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

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

.btn-success:hover {
    background: #218838;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

/* Modal de edición de titulares */
.owners-edit-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
}

.owner-edit-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

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

.owner-number {
    background: #4CAF50;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.owner-fields {
    display: flex;
    gap: 8px;
    flex: 1;
}

.owner-fields input {
    flex: 1;
    padding: 8px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 14px;
}

.owner-fields input:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Confirmación de asignación */
.assignment-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
}

.assignment-details p {
    margin-bottom: 8px;
}

.assignment-details strong {
    color: #333;
}

/* Búsqueda de asignaciones */
.search-box {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
}

.search-box:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Estilos adicionales para interfaz de asignaciones */
.assignments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.assignments-header h3 {
    margin: 0;
    color: #333;
}

.search-box-container {
    flex: 1;
    max-width: 400px;
}

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

.assignments-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.assignment-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.assignment-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.assignment-seller {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.seller-phone {
    font-size: 14px;
    color: #6c757d;
}

.assignment-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

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

.status-paid {
    background: #d1ecf1;
    color: #0c5460;
}

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

.status-cancelled {
    background: #e2e3e5;
    color: #383d41;
}

.assignment-details {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.assignment-numbers, .assignment-amount, .assignment-deadline {
    font-size: 14px;
}

.assignment-actions {
    padding: 15px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    border-top: 1px solid #e9ecef;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-info {
    background: #17a2b8;
    color: white;
    border: none;
}

.btn-info:hover {
    background: #138496;
}

/* Responsive para asignaciones */
@media (max-width: 768px) {
    .assignments-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box-container {
        max-width: none;
    }
    
    .assignments-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .assignment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .assignment-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .owner-edit-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    
    .owner-fields {
        flex-direction: column;
    }
    
    .assignments-stats {
        grid-template-columns: 1fr;
    }
}

/* Estilos para modales de asignaciones y Google Sheets */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

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

.close-btn {
    color: #999;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    background: none;
    border: none;
}

.close-btn:hover {
    color: #333;
}

.modal-body {
    padding: 20px 25px;
}

.modal-footer {
    padding: 15px 25px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #6c757d;
}

.assignment-preview {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.assignment-create-section {
    margin-bottom: 20px;
    text-align: center;
}

/* Estilos para radio buttons de método de asignación */
.assignment-method-radio {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.assignment-method-radio label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.assignment-method-radio label:hover {
    background: #e9ecef;
}

.assignment-method-radio input[type="radio"] {
    margin: 0;
    width: auto;
}

.assignment-method-radio input[type="radio"]:checked + span {
    font-weight: 600;
    color: #4CAF50;
}

/* Transiciones suaves para alternar grupos */
#manualNumbersGroup,
#consecutiveNumbersGroup {
    transition: all 0.3s ease;
    overflow: hidden;
}

.consecutive-info {
    background: #e8f5e8;
    padding: 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 13px;
    color: #2d5016;
    border-left: 4px solid #4CAF50;
}

.utility-group {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.utility-group h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

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

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

/* Responsive para modales */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
        max-height: 85vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer button {
        width: 100%;
        margin-bottom: 5px;
    }
}

/* =============================================
   ✅ ESTILOS PARA CORRECCIONES DE WHATSAPP
   ============================================= */

.whatsapp-btn {
    background: #25D366 !important;
    color: white !important;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    display: inline-block;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.whatsapp-btn:hover {
    background: #1DA851 !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* Modal de confirmación de pago mejorado */
#paymentConfirmationModal .modal-content {
    max-width: 600px;
}

.whatsapp-section {
    background: #e8f5e8;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #4CAF50;
}

.whatsapp-section h4 {
    color: #2d5016;
    margin-bottom: 10px;
    font-size: 16px;
}

.whatsapp-section p {
    color: #2d5016;
    font-size: 14px;
    margin-bottom: 15px;
}

.whatsapp-section button {
    width: 100%;
    background: #25D366;
    padding: 12px;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    color: white;
    transition: all 0.3s ease;
}

.whatsapp-section button:hover {
    background: #1DA851 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

/* Estilos para el modal de confirmación mejorado */
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.confirmation-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.success-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.sale-summary {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: left;
}

.sale-summary p {
    margin: 5px 0;
    font-size: 14px;
}

/* Responsive para WhatsApp */
@media (max-width: 768px) {
    .whatsapp-btn {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    .whatsapp-section {
        margin: 15px 0;
        padding: 12px;
    }
    
    .whatsapp-section h4 {
        font-size: 14px;
    }
    
    .whatsapp-section p {
        font-size: 12px;
    }
    
    .whatsapp-section button {
        padding: 10px;
        font-size: 14px;
    }
}