* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    color: white;
    text-align: center;
    font-size: 2.2em;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.subtitle {
    color: rgba(255,255,255,0.9);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.1em;
}

/* Grid principal */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Paneles */
.panel {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.panel h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Formularios */
.form-group {
    margin-bottom: 15px;
}

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

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

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.separator {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.separator span {
    background: white;
    padding: 0 15px;
    color: #999;
    position: relative;
    z-index: 1;
}

.separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

/* Botones */
.btn-primary,
.btn-secondary,
.btn-calcular,
.btn-danger,
.btn-pdf {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-top: 10px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #48bb78;
    color: white;
}

.btn-secondary:hover {
    background: #38a169;
}

.btn-calcular {
    background: #ed8936;
    color: white;
    font-size: 18px;
    padding: 15px 30px;
}

.btn-calcular:hover:not(:disabled) {
    background: #dd6b20;
    transform: translateY(-2px);
}

.btn-calcular:disabled {
    background: #ccc;
    cursor: not-allowed;
}

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

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

.btn-pdf {
    background: #e53e3e;
    color: white;
}

.btn-pdf:hover {
    background: #c53030;
}

/* Info box */
.info-box {
    background: #f7fafc;
    border-left: 4px solid #667eea;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.info-box h3 {
    color: #333;
    margin-bottom: 10px;
}

.info-box ul {
    list-style: none;
    padding-left: 0;
}

.info-box li {
    padding: 5px 0;
    color: #555;
}

/* Tabla de equipos */
.equipos-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.equipos-section h2 {
    color: #333;
    margin-bottom: 20px;
}

.table-responsive {
    overflow-x: auto;
}

#tabla-equipos {
    width: 100%;
    border-collapse: collapse;
}

#tabla-equipos th {
    background: #667eea;
    color: white;
    padding: 12px;
    text-align: left;
}

#tabla-equipos td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

#tabla-equipos .empty-row td {
    text-align: center;
    color: #999;
    padding: 30px;
}

.btn-eliminar {
    background: #f56565;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.btn-eliminar:hover {
    background: #e53e3e;
}

.acciones-equipos {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.acciones-equipos button {
    flex: 1;
}

/* Resultados */
.resultados-section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.resultado-mensaje {
    background: #f0fff4;
    border: 2px solid #48bb78;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    font-size: 1.2em;
    line-height: 1.6;
}

.resultado-detalle {
    background: #f7fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.resultado-detalle h2 {
    color: #333;
    margin-bottom: 20px;
}

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

.detalle-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.detalle-item h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.detalle-item p {
    font-size: 1.5em;
    font-weight: bold;
    color: #333;
}

.detalle-item small {
    color: #666;
    font-size: 0.9em;
}

.notas {
    background: #fef5e7;
    border-left: 4px solid #ed8936;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.acciones-resultado {
    display: flex;
    gap: 15px;
}

.acciones-resultado button {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8em;
    }
    
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .acciones-equipos,
    .acciones-resultado {
        flex-direction: column;
    }
    
    #tabla-equipos {
        font-size: 14px;
    }
    
    #tabla-equipos th,
    #tabla-equipos td {
        padding: 8px;
    }
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}