* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #1a252f 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    max-width: 360px;
    max-height: 360px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    backdrop-filter: blur(15px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0,0,0,0.4);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Controls */
.controls {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Import Section */
.import-section {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

.import-section h3 {
    color: #333;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.import-section p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    font-weight: 600;
    color: #555;
}

.control-group input,
.control-group select {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: white;
}

.control-group input:focus,
.control-group select:focus {
    outline: none;
    border-color: #3498db;
}

.control-group select {
    cursor: pointer;
}

/* Estilos para el datalist */
.control-group input[list] {
    cursor: text;
}

.control-group input[list]:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(86, 171, 47, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 65, 108, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(79, 172, 254, 0.4);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card i {
    font-size: 2rem;
    color: #3498db;
    margin-bottom: 10px;
}

.stat-card span {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-card label {
    color: #666;
    font-weight: 500;
}

/* Mesas Container */
.mesas-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.mesa {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.mesa:hover {
    transform: translateY(-5px);
}

.mesa-header {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.mesa-header h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.mesa-header .capacidad {
    opacity: 0.9;
    font-size: 0.9rem;
}

.mesa-body {
    padding: 20px;
}

.invitados-lista {
    min-height: 100px;
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.invitados-lista.drag-over {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
}

.invitado {
    background: #f8f9fa;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    transition: all 0.3s ease;
}

.invitado:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.invitado-actions {
    display: flex;
    gap: 5px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 5px;
}

.btn-edit {
    background: #ffc107;
    color: #333;
}

.btn-remove {
    background: #dc3545;
    color: white;
}

/* Invitados sin asignar */
.invitados-sin-asignar {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 25px;
    margin-bottom: 30px;
}

.invitados-sin-asignar h3 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Actions */
.actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.modal-large {
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    margin: 5% auto;
}

/* Estilos para el modal de invitados por mesa */
.search-section {
    margin-bottom: 30px;
}

.search-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 15px;
}

.search-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-results {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: #f8f9fa;
}

.search-result-item {
    padding: 10px 15px;
    border-bottom: 1px solid #e1e5e9;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-result-item:hover {
    background-color: #e9ecef;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item .invitado-info {
    font-weight: 600;
    color: #333;
}

.search-result-item .mesa-info {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.mesas-overview {
    margin-bottom: 30px;
}

.mesas-overview h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.mesas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.mesa-overview-card {
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.mesa-overview-card:hover {
    border-color: #3498db;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.1);
}

.mesa-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e1e5e9;
}

.mesa-overview-header h5 {
    color: #333;
    font-size: 1.1rem;
    margin: 0;
}

.mesa-overview-header .capacidad {
    background: #3498db;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

.mesa-overview-invitados {
    max-height: 200px;
    overflow-y: auto;
}

.mesa-invitado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: white;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.mesa-invitado-item:last-child {
    margin-bottom: 0;
}

.mesa-invitado-item .nombre {
    font-weight: 500;
    color: #333;
}

.mesa-invitado-item .acciones {
    display: flex;
    gap: 5px;
}

.btn-micro {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-mover {
    background: #ffc107;
    color: #333;
}

.btn-mover:hover {
    background: #e0a800;
}

.btn-eliminar {
    background: #dc3545;
    color: white;
}

.btn-eliminar:hover {
    background: #c82333;
}

.invitados-sin-asignar-overview {
    margin-top: 30px;
}

.invitados-sin-asignar-overview h4 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.invitados-sin-asignar-list {
    max-height: 200px;
    overflow-y: auto;
    border: 2px dashed #e1e5e9;
    border-radius: 8px;
    padding: 15px;
    background: #f8f9fa;
}

.invitado-sin-asignar-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.invitado-sin-asignar-item:last-child {
    margin-bottom: 0;
}

.invitado-sin-asignar-item .nombre {
    font-weight: 500;
    color: #333;
}

.invitado-sin-asignar-item .estado {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #333;
}

.modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal-content input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 20px;
}

.modal-content input:focus {
    outline: none;
    border-color: #3498db;
}

/* Responsive */
@media (max-width: 768px) {
    .controls {
        grid-template-columns: 1fr;
    }
    
    .stats {
        grid-template-columns: 1fr;
    }
    
    .mesas-container {
        grid-template-columns: 1fr;
    }
    
    .actions {
        flex-direction: column;
        align-items: center;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .logo {
        max-width: 240px;
        max-height: 240px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mesa {
    animation: fadeIn 0.5s ease;
}

/* Empty state */
.invitados-lista:empty::before {
    content: "Arrastra invitados aquí";
    color: #999;
    font-style: italic;
    text-align: center;
    display: block;
    padding: 20px;
}

/* Drag and drop visual feedback */
.invitado.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.mesa.drag-over .invitados-lista {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.1);
} 